diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2017-05-19 14:28:57 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2017-05-20 08:41:34 +0300 |
commit | a4d4a5fe82bc87b222c50d192adf5e379fe6365d (patch) | |
tree | c467679dffa8bda0cf8c79e3d4f15c7b57337808 /storage/xtradb | |
parent | 65e1399e64a306f1ce1d920e66206954f8630da8 (diff) | |
download | mariadb-git-a4d4a5fe82bc87b222c50d192adf5e379fe6365d.tar.gz |
After-merge fix for MDEV-11638
In commit 360a4a037271d65ab6471f7ab3f9b6a893d90a31
some debug assertions were introduced to the page flushing code
in XtraDB. Add these assertions to InnoDB as well, and adjust
the InnoDB shutdown so that these assertions will not fail.
logs_empty_and_mark_files_at_shutdown(): Advance
srv_shutdown_state from the first phase SRV_SHUTDOWN_CLEANUP
only after no page-dirtying activity is possible
(well, except by srv_master_do_shutdown_tasks(), which will be
fixed separately in MDEV-12052).
rotate_thread_t::should_shutdown(): Already exit the key rotation
threads at the first phase of shutdown (SRV_SHUTDOWN_CLEANUP).
page_cleaner_sleep_if_needed(): Do not sleep during shutdown.
This change is originally from XtraDB.
Diffstat (limited to 'storage/xtradb')
-rw-r--r-- | storage/xtradb/fil/fil0crypt.cc | 4 | ||||
-rw-r--r-- | storage/xtradb/log/log0log.cc | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/storage/xtradb/fil/fil0crypt.cc b/storage/xtradb/fil/fil0crypt.cc index bbafad6d04b..da78d4dd85d 100644 --- a/storage/xtradb/fil/fil0crypt.cc +++ b/storage/xtradb/fil/fil0crypt.cc @@ -1294,10 +1294,10 @@ struct rotate_thread_t { bool should_shutdown() const { switch (srv_shutdown_state) { case SRV_SHUTDOWN_NONE: - case SRV_SHUTDOWN_CLEANUP: return thread_no >= srv_n_fil_crypt_threads; - case SRV_SHUTDOWN_FLUSH_PHASE: + case SRV_SHUTDOWN_CLEANUP: return true; + case SRV_SHUTDOWN_FLUSH_PHASE: case SRV_SHUTDOWN_LAST_PHASE: case SRV_SHUTDOWN_EXIT_THREADS: break; diff --git a/storage/xtradb/log/log0log.cc b/storage/xtradb/log/log0log.cc index 7abab278416..d39bcb87117 100644 --- a/storage/xtradb/log/log0log.cc +++ b/storage/xtradb/log/log0log.cc @@ -3639,8 +3639,8 @@ wait_suspend_loop: switch (srv_get_active_thread_type()) { case SRV_NONE: - srv_shutdown_state = SRV_SHUTDOWN_FLUSH_PHASE; if (!srv_n_fil_crypt_threads_started) { + srv_shutdown_state = SRV_SHUTDOWN_FLUSH_PHASE; break; } os_event_set(fil_crypt_threads_event); |