diff options
author | James Wahlin <james@mongodb.com> | 2018-03-27 16:27:34 -0400 |
---|---|---|
committer | James Wahlin <james@mongodb.com> | 2018-03-28 09:15:21 -0400 |
commit | 9b6da195207b71348dd1811dfbd6f8ca5c9b7428 (patch) | |
tree | efd9f073ffcb9d5237bb0a4fc695aefe08eb7c6b /src/mongo/db/session_catalog.cpp | |
parent | 82e4873c00f01e4dcb5aad4a6550a82ec4aa4a65 (diff) | |
download | mongo-9b6da195207b71348dd1811dfbd6f8ca5c9b7428.tar.gz |
SERVER-34101 Revert change to free transaction resources on snapshot read killCursors
Diffstat (limited to 'src/mongo/db/session_catalog.cpp')
-rw-r--r-- | src/mongo/db/session_catalog.cpp | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/src/mongo/db/session_catalog.cpp b/src/mongo/db/session_catalog.cpp index 23f830be2e3..48869e4c338 100644 --- a/src/mongo/db/session_catalog.cpp +++ b/src/mongo/db/session_catalog.cpp @@ -156,28 +156,6 @@ ScopedSession SessionCatalog::getOrCreateSession(OperationContext* opCtx, return ss; } -boost::optional<ScopedSession> SessionCatalog::getSession(OperationContext* opCtx, - const LogicalSessionId& lsid) { - invariant(!opCtx->lockState()->isLocked()); - invariant(!OperationContextSession::get(opCtx)); - - boost::optional<ScopedSession> ss; - { - stdx::unique_lock<stdx::mutex> ul(_mutex); - auto sri = _getSessionRuntimeInfo(ul, opCtx, lsid); - if (sri) { - ss = ScopedSession(sri); - } - } - - // Perform the refresh outside of the mutex. - if (ss) { - (*ss)->refreshFromStorageIfNeeded(opCtx); - } - - return ss; -} - void SessionCatalog::invalidateSessions(OperationContext* opCtx, boost::optional<BSONObj> singleSessionDoc) { uassert(40528, @@ -244,18 +222,6 @@ std::shared_ptr<SessionCatalog::SessionRuntimeInfo> SessionCatalog::_getOrCreate return it->second; } -std::shared_ptr<SessionCatalog::SessionRuntimeInfo> SessionCatalog::_getSessionRuntimeInfo( - WithLock, OperationContext* opCtx, const LogicalSessionId& lsid) { - invariant(!opCtx->lockState()->inAWriteUnitOfWork()); - - auto it = _txnTable.find(lsid); - if (it == _txnTable.end()) { - return nullptr; - } - - return it->second; -} - void SessionCatalog::_releaseSession(const LogicalSessionId& lsid) { stdx::lock_guard<stdx::mutex> lg(_mutex); |