-
Vladislav Vaintroub authored
Before this patch, InnoDB purge submitted innodb_purge_threads-1 tasks, even if there was insufficient work for all. For example, with innodb_purge_threads at the default (4) and updates on a single table, only one thread could work, yet three tasks were submitted. This caused unnecessary wakeups and context switches. The patch modifies trx_purge_attach_undo_recs() to create as many work items as necessary. The purge coordinator now processes more tasks itself, which reduces context switching and improves efficiency.
8c547853