diff options
author | Xiangyu Yao <xiangyu.yao@mongodb.com> | 2019-01-10 14:45:54 -0500 |
---|---|---|
committer | Xiangyu Yao <xiangyu.yao@mongodb.com> | 2019-01-22 11:19:55 -0500 |
commit | b1830f1ad949059fd7d70cc9490e0216fd30b438 (patch) | |
tree | 28ea8e383e71caeb1edfcec4700db0abf8f39b27 /src/mongo/db/concurrency | |
parent | 9de1d61550232f370afa1b4f98bfe6aa7e2cf60f (diff) | |
download | mongo-b1830f1ad949059fd7d70cc9490e0216fd30b438.tar.gz |
SERVER-37406 Save logical session id in the locker when stashing the transaction
Diffstat (limited to 'src/mongo/db/concurrency')
-rw-r--r-- | src/mongo/db/concurrency/lock_manager.cpp | 6 | ||||
-rw-r--r-- | src/mongo/db/concurrency/locker.h | 9 |
2 files changed, 13 insertions, 2 deletions
diff --git a/src/mongo/db/concurrency/lock_manager.cpp b/src/mongo/db/concurrency/lock_manager.cpp index 1a5520494bf..7fb75ef2896 100644 --- a/src/mongo/db/concurrency/lock_manager.cpp +++ b/src/mongo/db/concurrency/lock_manager.cpp @@ -916,7 +916,8 @@ void LockManager::_dumpBucket(const LockBucket* bucket) const { << "Thread = " << threadId.str() << "; " << "ConvertMode = " << modeName(iter->convertMode) << "; " << "EnqueueAtFront = " << iter->enqueueAtFront << "; " - << "CompatibleFirst = " << iter->compatibleFirst << "; " << '\n'; + << "CompatibleFirst = " << iter->compatibleFirst << "; " + << "DebugInfo = " << iter->locker->getDebugInfo() << '\n'; } sb << "PENDING:\n"; @@ -930,7 +931,8 @@ void LockManager::_dumpBucket(const LockBucket* bucket) const { << "Thread = " << threadId.str() << "; " << "ConvertMode = " << modeName(iter->convertMode) << "; " << "EnqueueAtFront = " << iter->enqueueAtFront << "; " - << "CompatibleFirst = " << iter->compatibleFirst << "; " << '\n'; + << "CompatibleFirst = " << iter->compatibleFirst << "; " + << "DebugInfo = " << iter->locker->getDebugInfo() << '\n'; } sb << "-----------------------------------------------------------\n"; diff --git a/src/mongo/db/concurrency/locker.h b/src/mongo/db/concurrency/locker.h index af408035a4d..66bda894552 100644 --- a/src/mongo/db/concurrency/locker.h +++ b/src/mongo/db/concurrency/locker.h @@ -461,6 +461,14 @@ public: return _numResourcesToUnlockAtEndUnitOfWork; } + std::string getDebugInfo() const { + return _debugInfo; + } + + void setDebugInfo(const std::string& info) { + _debugInfo = info; + } + protected: Locker() {} @@ -481,6 +489,7 @@ protected: private: bool _shouldConflictWithSecondaryBatchApplication = true; bool _shouldAcquireTicket = true; + std::string _debugInfo; // Extra info about this locker for debugging purpose }; /** |