summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/refresh_sessions_command.cpp
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2019-05-21 14:01:46 -0400
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2019-05-24 09:39:30 -0400
commit497a301902e635f204ca057aa2872627b766491c (patch)
tree6282bc6af9d6e570ac6adc89bb4dc85b8bf45f92 /src/mongo/db/commands/refresh_sessions_command.cpp
parent7536959e9afa7e5dd0ef7bc807630630e48d5706 (diff)
downloadmongo-497a301902e635f204ca057aa2872627b766491c.tar.gz
SERVER-41193 Get rid of LogicalSessionCache promote and refreshSessions
Substitutes the uses with calls to vivify.
Diffstat (limited to 'src/mongo/db/commands/refresh_sessions_command.cpp')
-rw-r--r--src/mongo/db/commands/refresh_sessions_command.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mongo/db/commands/refresh_sessions_command.cpp b/src/mongo/db/commands/refresh_sessions_command.cpp
index a74ddc04589..6c177f743f1 100644
--- a/src/mongo/db/commands/refresh_sessions_command.cpp
+++ b/src/mongo/db/commands/refresh_sessions_command.cpp
@@ -83,8 +83,12 @@ public:
auto refreshSessionsRequest = RefreshSessionsCmdFromClient::parse(
IDLParserErrorContext("RefreshSessionsCmdFromClient"), cmdObj);
- uassertStatusOK(LogicalSessionCache::get(opCtx)->refreshSessions(
- opCtx, refreshSessionsRequest.getSessions()));
+ const auto lsCache = LogicalSessionCache::get(opCtx);
+
+ for (const auto& lsid :
+ makeLogicalSessionIds(refreshSessionsRequest.getSessions(), opCtx)) {
+ uassertStatusOK(lsCache->vivify(opCtx, lsid));
+ }
return true;
}