diff options
author | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2017-08-02 12:15:58 +0300 |
---|---|---|
committer | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2017-08-02 12:15:58 +0300 |
commit | b278c02e18dbcb0e8920192fa5ac3da83e397826 (patch) | |
tree | e8b38f5919338929a769b184d500b8bf3398e991 | |
parent | 60c9485a8e5ebf410d9fa60caa7937f3fe3ca9b8 (diff) | |
parent | 04ae1207edec4cac80d7206377ae22a8447aa08f (diff) | |
download | mariadb-git-b278c02e18dbcb0e8920192fa5ac3da83e397826.tar.gz |
Merge branch 'merge-xtradb-5.6' into 10.0
-rw-r--r-- | storage/xtradb/buf/buf0flu.cc | 16 | ||||
-rw-r--r-- | storage/xtradb/include/univ.i | 2 | ||||
-rw-r--r-- | storage/xtradb/log/log0log.cc | 2 |
3 files changed, 17 insertions, 3 deletions
diff --git a/storage/xtradb/buf/buf0flu.cc b/storage/xtradb/buf/buf0flu.cc index 17bfb92580e..40ad9c6dbdd 100644 --- a/storage/xtradb/buf/buf0flu.cc +++ b/storage/xtradb/buf/buf0flu.cc @@ -2781,7 +2781,10 @@ DECLARE_THREAD(buf_flush_page_cleaner_thread)( when SRV_SHUTDOWN_CLEANUP is set other threads like the master and the purge threads may be working as well. We start flushing the buffer pool but can't be sure that no new pages are being - dirtied until we enter SRV_SHUTDOWN_FLUSH_PHASE phase. */ + dirtied until we enter SRV_SHUTDOWN_FLUSH_PHASE phase. Because + the LRU manager thread is also flushing at SRV_SHUTDOWN_CLEANUP + but not SRV_SHUTDOWN_FLUSH_PHASE, we only leave the + SRV_SHUTDOWN_CLEANUP loop when the LRU manager quits. */ do { n_flushed = page_cleaner_do_flush_batch(PCT_IO(100), LSN_MAX); @@ -2790,7 +2793,10 @@ DECLARE_THREAD(buf_flush_page_cleaner_thread)( if (n_flushed == 0) { os_thread_sleep(100000); } - } while (srv_shutdown_state == SRV_SHUTDOWN_CLEANUP); + + os_rmb; + } while (srv_shutdown_state == SRV_SHUTDOWN_CLEANUP + || buf_lru_manager_is_active); /* At this point all threads including the master and the purge thread must have been suspended. */ @@ -2807,6 +2813,11 @@ DECLARE_THREAD(buf_flush_page_cleaner_thread)( buf_flush_wait_batch_end(NULL, BUF_FLUSH_LIST); buf_flush_wait_LRU_batch_end(); +#ifdef UNIV_DEBUG + os_rmb; + ut_ad(!buf_lru_manager_is_active); +#endif + bool success; do { @@ -2885,6 +2896,7 @@ DECLARE_THREAD(buf_flush_lru_manager_thread)( } buf_lru_manager_is_active = false; + os_wmb; /* We count the number of threads in os_thread_exit(). A created thread should always use that to exit and not use return() to exit. */ diff --git a/storage/xtradb/include/univ.i b/storage/xtradb/include/univ.i index f554c50ff83..e2e571642b0 100644 --- a/storage/xtradb/include/univ.i +++ b/storage/xtradb/include/univ.i @@ -48,7 +48,7 @@ Created 1/20/1994 Heikki Tuuri #define INNODB_VERSION_BUGFIX 36 #ifndef PERCONA_INNODB_VERSION -#define PERCONA_INNODB_VERSION 82.0 +#define PERCONA_INNODB_VERSION 82.1 #endif /* Enable UNIV_LOG_ARCHIVE in XtraDB */ diff --git a/storage/xtradb/log/log0log.cc b/storage/xtradb/log/log0log.cc index 211cde3cc7a..a3b08eb6730 100644 --- a/storage/xtradb/log/log0log.cc +++ b/storage/xtradb/log/log0log.cc @@ -3577,6 +3577,7 @@ loop: before proceeding further. */ srv_shutdown_state = SRV_SHUTDOWN_FLUSH_PHASE; count = 0; + os_rmb; while (buf_page_cleaner_is_active || buf_lru_manager_is_active) { if (srv_print_verbose_log && count == 0) { ib_logf(IB_LOG_LEVEL_INFO, @@ -3588,6 +3589,7 @@ loop: if (count > 600) { count = 0; } + os_rmb; } mutex_enter(&log_sys->mutex); |