diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2016-11-10 09:42:49 +0200 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2016-11-10 09:42:49 +0200 |
commit | 8c038239748f6a9666e07e601a46967d3a0381d0 (patch) | |
tree | ba63120b0b0d1dd94dbbf348d378618ca8fef27b | |
parent | ada3d7581bd619a729f1243a730499eb4d07b054 (diff) | |
download | mariadb-git-8c038239748f6a9666e07e601a46967d3a0381d0.tar.gz |
MDEV-11250: mtflush threads stall on shutdown
Code calling mtflush threads to exit was too late.
-rw-r--r-- | storage/innobase/srv/srv0start.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/storage/innobase/srv/srv0start.cc b/storage/innobase/srv/srv0start.cc index 7b4d460139b..4be92906851 100644 --- a/storage/innobase/srv/srv0start.cc +++ b/storage/innobase/srv/srv0start.cc @@ -3,7 +3,7 @@ Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved. Copyright (c) 2008, Google Inc. Copyright (c) 2009, Percona Inc. -Copyright (c) 2013, 2015, MariaDB Corporation +Copyright (c) 2013, 2016, MariaDB Corporation Portions of this file contain modifications contributed and copyrighted by Google, Inc. Those modifications are gratefully acknowledged and are described @@ -1292,6 +1292,11 @@ srv_shutdown_all_bg_threads() logs_empty_and_mark_files_at_shutdown() and should have already quit or is quitting right now. */ + if (srv_use_mtflush) { + /* g. Exit the multi threaded flush threads */ + buf_mtflu_io_thread_exit(); + } + bool active = os_thread_active(); os_thread_sleep(100000); @@ -2809,11 +2814,6 @@ innobase_shutdown_for_mysql(void) /* 2. Make all threads created by InnoDB to exit */ srv_shutdown_all_bg_threads(); - if (srv_use_mtflush) { - /* g. Exit the multi threaded flush threads */ - buf_mtflu_io_thread_exit(); - } - if (srv_monitor_file) { fclose(srv_monitor_file); srv_monitor_file = 0; |