Commit eabb0aef authored by Sergei Golubchik's avatar Sergei Golubchik

sporadic crashes of innodb.innodb_prefix_index_restart_server

in slow shutdown mode purge threads really must exit only when there is
nothing to purge. Restore the trx_commit_disallowed check and
don't stop purge threads until all connection thread transactions
are gone.
parent a8e0c6fd
......@@ -340,6 +340,12 @@ thd_destructor_proxy(void *)
mysql_mutex_unlock(&thd_destructor_mutex);
thd_destructor_myvar = NULL;
srv_fast_shutdown = (ulint) innobase_fast_shutdown;
if (srv_fast_shutdown == 0) {
while (trx_sys_any_active_transactions()) {
os_thread_sleep(1000);
}
}
srv_purge_wakeup();
destroy_thd(thd);
......
......@@ -3073,6 +3073,12 @@ DECLARE_THREAD(srv_purge_coordinator_thread)(
n_pages_purged = trx_purge(1, srv_purge_batch_size, false);
}
#ifdef UNIV_DEBUG
if (srv_fast_shutdown == 0) {
trx_commit_disallowed = true;
}
#endif /* UNIV_DEBUG */
/* This trx_purge is called to remove any undo records (added by
background threads) after completion of the above loop. When
srv_fast_shutdown != 0, a large batch size can cause significant
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment