diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2020-06-03 16:19:13 +0200 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2020-06-03 16:37:00 +0200 |
commit | bee4b044f6131f07ce53b052949155f58d5af6b6 (patch) | |
tree | 9230b4f99c1d3aad92cfa0f213f27cb461102554 /storage/innobase/include/srv0srv.h | |
parent | 839ad5e1326a65469eac192af36b3ec035396703 (diff) | |
download | mariadb-git-bee4b044f6131f07ce53b052949155f58d5af6b6.tar.gz |
MDEV-21751 innodb_fast_shutdown=0 can be unnecessarily slow
max out parallel purge worker tasks, on slow shutdown, to speedup
Diffstat (limited to 'storage/innobase/include/srv0srv.h')
-rw-r--r-- | storage/innobase/include/srv0srv.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h index b0d36d6ad48..23414448a71 100644 --- a/storage/innobase/include/srv0srv.h +++ b/storage/innobase/include/srv0srv.h @@ -757,6 +757,16 @@ srv_que_task_enqueue_low( /*=====================*/ que_thr_t* thr); /*!< in: query thread */ +/** +Flag which is set, whenever innodb_purge_threads changes. +It is read and reset in srv_do_purge(). + +Thus it is Atomic_counter<int>, not bool, since unprotected +reads are used. We just need an atomic with relaxed memory +order, to please Thread Sanitizer. +*/ +extern Atomic_counter<int> srv_purge_thread_count_changed; + #ifdef UNIV_DEBUG /** @return whether purge or master task is active */ bool srv_any_background_activity(); @@ -796,7 +806,7 @@ ulint srv_get_task_queue_length(); void srv_purge_shutdown(); /** Init purge tasks*/ -void srv_init_purge_tasks(uint n_max); +void srv_init_purge_tasks(); #ifdef UNIV_DEBUG /** Disables master thread. It's used by: |