[Commits] 78318d34d: Add RangeLockManagerHandle::Counters::wait_count

psergey sergey at mariadb.com
Mon Nov 22 23:06:23 EET 2021


revision-id: 78318d34ddd05b9413090151bfc7bd5f7a7d74c2 (v5.8-3687-g78318d34d)
parent(s): a6f155555ce451d855ab4617cf7bc00991ac2c62
author: Sergei Petrunia
committer: Sergei Petrunia
timestamp: 2021-11-23 00:06:23 +0300
message:

Add RangeLockManagerHandle::Counters::wait_count

---
 include/rocksdb/utilities/transaction_db.h                            | 2 ++
 .../transactions/lock/range/range_tree/range_tree_lock_manager.cc     | 4 ++++
 2 files changed, 6 insertions(+)

diff --git a/include/rocksdb/utilities/transaction_db.h b/include/rocksdb/utilities/transaction_db.h
index 265d4b79a..a66c9b573 100644
--- a/include/rocksdb/utilities/transaction_db.h
+++ b/include/rocksdb/utilities/transaction_db.h
@@ -104,6 +104,8 @@ class RangeLockManagerHandle : public LockManagerHandle {
     // Number of times lock escalation was triggered (for all column families)
     uint64_t escalation_count;
 
+    uint64_t wait_count;
+
     // How much memory is currently used for locks (total for all column
     // families)
     uint64_t current_lock_memory;
diff --git a/utilities/transactions/lock/range/range_tree/range_tree_lock_manager.cc b/utilities/transactions/lock/range/range_tree/range_tree_lock_manager.cc
index 55a66bc59..2901d32fd 100644
--- a/utilities/transactions/lock/range/range_tree/range_tree_lock_manager.cc
+++ b/utilities/transactions/lock/range/range_tree/range_tree_lock_manager.cc
@@ -331,6 +331,10 @@ RangeLockManagerHandle::Counters RangeTreeLockManager::GetStatus() {
       res.escalation_count = status->value.num;
       continue;
     }
+    if (strcmp(status->keyname, "LTM_WAIT_COUNT") == 0) {
+      res.wait_count = status->value.num;
+      continue;
+    }
     if (strcmp(status->keyname, "LTM_SIZE_CURRENT") == 0) {
       res.current_lock_memory = status->value.num;
     }


More information about the commits mailing list