mariadb/tpool
Marko Mäkelä 8b97eba31b MDEV-21674 purge_sys.stop() fails to wait for purge workers to complete
Since commit 5e62b6a5e0 (MDEV-16264),
purge_sys_t::stop() no longer waited for all purge activity to stop.

This caused problems on FLUSH TABLES...FOR EXPORT because of
purge running concurrently with the buffer pool flush.
The assertion at the end of buf_flush_dirty_pages() could fail.

The, implemented by Vladislav Vaintroub, aims to eliminate race
conditions when stopping or resuming purge:

waitable_task::disable(): Wait for the task to complete, then replace
the task callback function with noop.

waitable_task::enable(): Restore the original task callback function
after disable().

purge_sys_t::stop(): Invoke purge_coordinator_task.disable().

purge_sys_t::resume(): Invoke purge_coordinator_task.enable().

purge_sys_t::running(): Add const qualifier, and clarify the comment.
The purge coordinator task will remain active as long as any purge
worker task is active.

purge_worker_callback(): Assert purge_sys.running().

srv_purge_wakeup(): Merge with the only caller purge_sys_t::resume().

purge_coordinator_task: Use static linkage.
2020-02-07 08:12:58 +02:00
..
aio_linux.cc MDEV-16264: Minor cleanup 2019-12-03 11:05:18 +02:00
aio_simulated.cc MDEV-16264: Minor cleanup 2019-12-03 11:05:18 +02:00
aio_win.cc MDEV-16264: Add threadpool library 2019-11-15 16:50:22 +01:00
CMakeLists.txt MDEV-16264 - some improvements 2019-12-09 21:12:13 +01:00
task.cc MDEV-21674 purge_sys.stop() fails to wait for purge workers to complete 2020-02-07 08:12:58 +02:00
task_group.cc tpool - implement post-task callback (for Innodb debugging) 2020-01-12 19:08:02 +01:00
tpool.h MDEV-21674 purge_sys.stop() fails to wait for purge workers to complete 2020-02-07 08:12:58 +02:00
tpool_generic.cc MDEV-21551 : Assertion `m_active_threads.size() >= m_long_tasks_count + m_waiting_task_count' failed" 2020-01-23 15:23:46 +01:00
tpool_structs.h MDEV-21326 : Address TSAN warnings in tpool. 2020-01-12 20:30:26 +01:00
tpool_win.cc tpool - implement post-task callback (for Innodb debugging) 2020-01-12 19:08:02 +01:00
wait_notification.cc tpool - misc fixes 2020-01-12 21:34:59 +01:00