Skip to content

Commit 9189284

Browse files
committed
remove a race-condition prone assertion
on shutdown it might happen that 1. the server starts killing THDs 2. it sets thd->killed in srv_purge_coordinator 3. srv_purge_coordinator notices that and tells srv_workers to exit 4. srv_worker will notice that and will start exiting, ... assert here ... 5. server sets thd->killed in worker threads that is, it might happen that the assert is tested before srv_worker's THD got the kill signal. this fixes various random crashes (on this assertion) on shutdown in tests
1 parent 3d12587 commit 9189284

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

storage/innobase/srv/srv0srv.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2720,7 +2720,6 @@ DECLARE_THREAD(srv_worker_thread)(
27202720

27212721
ut_a(!purge_sys->running);
27222722
ut_a(purge_sys->state == PURGE_STATE_EXIT);
2723-
ut_a(srv_shutdown_state > SRV_SHUTDOWN_NONE || thd_kill_level(thd));
27242723

27252724
rw_lock_x_unlock(&purge_sys->latch);
27262725

0 commit comments

Comments
 (0)