diff options
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); |