summaryrefslogtreecommitdiff
path: root/storage/innobase/include
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2021-03-30 13:28:05 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2021-03-30 13:28:05 +0300
commit75db05c5992e5a13ab0836120f46e241fc6de618 (patch)
tree2a5954e28e387eccf90810d10eeb70c7f28f5939 /storage/innobase/include
parent49ddfb63780c55b4133755c3479e13c7ea9a9d7b (diff)
parent76d2846a71a155ee2861fd52e6635e35490a9dd1 (diff)
downloadmariadb-git-75db05c5992e5a13ab0836120f46e241fc6de618.tar.gz
Merge 10.5 into 10.6 (except MDEV-24630)
Commit 76d2846a71a155ee2861fd52e6635e35490a9dd1 was for 10.5 only. It caused some performance regression on 10.6 in some cases, likely related to the removal of ib_mutex_t in MDEV-21452.
Diffstat (limited to 'storage/innobase/include')
-rw-r--r--storage/innobase/include/log0log.h17
1 files changed, 6 insertions, 11 deletions
diff --git a/storage/innobase/include/log0log.h b/storage/innobase/include/log0log.h
index a3085f0f2dd..89cef8d69ed 100644
--- a/storage/innobase/include/log0log.h
+++ b/storage/innobase/include/log0log.h
@@ -2,7 +2,7 @@
Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2009, Google Inc.
-Copyright (c) 2017, 2020, MariaDB Corporation.
+Copyright (c) 2017, 2021, MariaDB Corporation.
Portions of this file contain modifications contributed and copyrighted by
Google, Inc. Those modifications are gratefully acknowledged and are described
@@ -87,12 +87,6 @@ log_free_check(void);
@param[in] len requested minimum size in bytes */
void log_buffer_extend(ulong len);
-/** Read the current LSN. */
-#define log_get_lsn() log_sys.get_lsn()
-
-/** Read the durable LSN */
-#define log_get_flush_lsn() log_sys.get_flushed_lsn()
-
/** Calculate the recommended highest values for lsn - last_checkpoint_lsn
and lsn - buf_pool.get_oldest_modification().
@param[in] file_size requested innodb_log_file_size
@@ -652,13 +646,14 @@ public:
bool is_initialised() const { return m_initialised; }
- lsn_t get_lsn() const { return lsn.load(std::memory_order_relaxed); }
- void set_lsn(lsn_t lsn) { this->lsn.store(lsn, std::memory_order_relaxed); }
+ lsn_t get_lsn(std::memory_order order= std::memory_order_relaxed) const
+ { return lsn.load(order); }
+ void set_lsn(lsn_t lsn) { this->lsn.store(lsn, std::memory_order_release); }
lsn_t get_flushed_lsn() const
- { return flushed_to_disk_lsn.load(std::memory_order_relaxed); }
+ { return flushed_to_disk_lsn.load(std::memory_order_acquire); }
void set_flushed_lsn(lsn_t lsn)
- { flushed_to_disk_lsn.store(lsn, std::memory_order_relaxed); }
+ { flushed_to_disk_lsn.store(lsn, std::memory_order_release); }
bool check_flush_or_checkpoint() const
{