diff options
author | Max Hirschhorn <max.hirschhorn@mongodb.com> | 2017-08-10 21:49:32 -0400 |
---|---|---|
committer | Max Hirschhorn <max.hirschhorn@mongodb.com> | 2017-08-10 21:49:32 -0400 |
commit | 2bc6879661194e93320b7f24e4b9ba0ffd89d7c3 (patch) | |
tree | d008623c9a3717a9aa8a72f0b1d9b3bd311c169e /src/mongo/db/logical_session_cache.cpp | |
parent | 3a6f7017c2577af96c377f1500998565737952e6 (diff) | |
download | mongo-2bc6879661194e93320b7f24e4b9ba0ffd89d7c3.tar.gz |
Revert "SERVER-29202 Add a refreshLogicalSessionCacheNow test command"
This reverts commit e1978af38dff725f0a0a60bca39a21b072751218.
Diffstat (limited to 'src/mongo/db/logical_session_cache.cpp')
-rw-r--r-- | src/mongo/db/logical_session_cache.cpp | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/mongo/db/logical_session_cache.cpp b/src/mongo/db/logical_session_cache.cpp index fb3518ada63..7baeb66593d 100644 --- a/src/mongo/db/logical_session_cache.cpp +++ b/src/mongo/db/logical_session_cache.cpp @@ -226,17 +226,8 @@ void LogicalSessionCache::_refresh(Client* client) { // failed to refresh, it means their authoritative records were removed, and // we should remove such records from our cache as well. { - boost::optional<ServiceContext::UniqueOperationContext> uniqueCtx; - auto* const opCtx = [&client, &uniqueCtx] { - if (client->getOperationContext()) { - return client->getOperationContext(); - } - - uniqueCtx.emplace(client->makeOperationContext()); - return uniqueCtx->get(); - }(); - - auto res = _sessionsColl->refreshSessions(opCtx, std::move(activeSessions), time); + auto opCtx = client->makeOperationContext(); + auto res = _sessionsColl->refreshSessions(opCtx.get(), std::move(activeSessions), time); if (!res.isOK()) { // TODO SERVER-29709: handle network errors here. return; |