It is being woken up unconditionally (does the purge thread get woken up
elsewhere as well?). However, the original condition didn't make sense as well
-- to check if history_len is a perfect multiple of innodb_purge_batch_size.
I think trx_sys->rseg_history_len < srv_purge_batch_size needs to checked in
trx_purge_add_update_undo_to_history before waking up the purge thread (unless
purge thread is not woken anywhere else), otherwise this break the definition
of innodb_purge_batch_size as well.
That patch was added in 234.1.13 as part of import innodb_io_patches into the tree.
The original code is from 0.15941.195
Now, the wall-time code referred to in the description was also added in as part of 234.1.13
234.1.13 stewart |
| cur_time = ut_time_ms();
| if (next_itr_time > cur_time) {
| os_thread_ sleep(ut_ min(1000000,
| (next_itr_time - cur_time)
| * 1000));
| next_itr_time = ut_time_ms() + 1000;
| } else {
| next_itr_time = cur_time + 1000;
| }
The thread was suspended for --
if (trx_sys- >rseg_history_ len < srv_purge_ batch_size
|| (n_total_purged == 0
&& retries >= TRX_SYS_N_RSEGS)) {
It is being woken up unconditionally (does the purge thread get woken up purge_batch_ size.
elsewhere as well?). However, the original condition didn't make sense as well
-- to check if history_len is a perfect multiple of innodb_
I think trx_sys- >rseg_history_ len < srv_purge_ batch_size needs to checked in add_update_ undo_to_ history before waking up the purge thread (unless purge_batch_ size as well.
trx_purge_
purge thread is not woken anywhere else), otherwise this break the definition
of innodb_