[Commits] bcc792368: Range Locking: return accurate cf_id value in GetLockStatusData()

Sergei Petrunia psergey at askmonty.org
Mon Apr 29 20:22:54 EEST 2019


revision-id: bcc7923688446c58a21f4f0ab287b147f406abc2 (v5.8-1040-gbcc792368)
parent(s): 293d6902411748728fb48bf63e63ba121a963788
author: Sergei Petrunia
committer: Sergei Petrunia
timestamp: 2019-04-29 20:22:54 +0300
message:

Range Locking: return accurate cf_id value in GetLockStatusData()

This is possible now, as we don't put locks from all column families
into one locktree anymore.

---
 utilities/transactions/transaction_lock_mgr.cc | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/utilities/transactions/transaction_lock_mgr.cc b/utilities/transactions/transaction_lock_mgr.cc
index 95e819b3a..f837f6a5a 100644
--- a/utilities/transactions/transaction_lock_mgr.cc
+++ b/utilities/transactions/transaction_lock_mgr.cc
@@ -1293,11 +1293,10 @@ void push_into_lock_status_data(void* param, const DBT *left,
 
 BaseLockMgr::LockStatusData RangeLockMgr::GetLockStatusData() {
   LockStatusData data;
-  LOCK_PRINT_CONTEXT ctx = {&data, GetColumnFamilyID(my_txn_db_->DefaultColumnFamily()) };
-
   {
     InstrumentedMutexLock l(&ltree_map_mutex_);
     for (auto it : ltree_map_) {
+      LOCK_PRINT_CONTEXT ctx = {&data, it.first };
       it.second->dump_locks((void*)&ctx, push_into_lock_status_data);
     }
   }


More information about the commits mailing list