diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2022-03-29 14:56:44 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2022-03-29 14:56:44 +0300 |
commit | 42609c240d7b0b5a418e7c77e74fa8274dda0bca (patch) | |
tree | 647082aff94366030ec81e6d59c11ed8de175623 /storage/innobase/srv | |
parent | b7016bd37929854a9c65b32a29e7314746da6ce8 (diff) | |
download | mariadb-git-42609c240d7b0b5a418e7c77e74fa8274dda0bca.tar.gz |
Cleanup: Replace log_sys.n_pending_checkpoint_writes with a Boolean
Only one checkpoint may be in progress at a time.
The counter log_sys.n_pending_checkpoint_writes
was being protected by log_sys.mutex.
Let us replace it with the Boolean log_sys.checkpoint_pending.
Diffstat (limited to 'storage/innobase/srv')
-rw-r--r-- | storage/innobase/srv/srv0mon.cc | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/storage/innobase/srv/srv0mon.cc b/storage/innobase/srv/srv0mon.cc index f13af13c8e3..7a9974d4842 100644 --- a/storage/innobase/srv/srv0mon.cc +++ b/storage/innobase/srv/srv0mon.cc @@ -2,7 +2,7 @@ Copyright (c) 2010, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. -Copyright (c) 2013, 2021, MariaDB Corporation. +Copyright (c) 2013, 2022, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -1909,10 +1909,7 @@ srv_mon_process_existing_counter( break; case MONITOR_PENDING_CHECKPOINT_WRITE: - mysql_mutex_lock(&log_sys.mutex); - value = static_cast<mon_type_t>( - log_sys.n_pending_checkpoint_writes); - mysql_mutex_unlock(&log_sys.mutex); + value = log_sys.checkpoint_pending; break; case MONITOR_LOG_IO: |