From 2791817876636c0cfd60d867f31c7a83cf3f18c1 Mon Sep 17 00:00:00 2001 From: Kaloian Manassiev Date: Fri, 3 May 2019 16:21:24 -0400 Subject: SERVER-37837 Get rid of TransactionReaper (Part 1) This change gets rid of the TransactionReaper's usage of the ReplicationCoordinator for checking whether it is primary or not and makes the LogicalSessionCache joinable on shutdown. It also removes the TransactionReaper's grouping per-shard optimization and moves it all under SessionCollectionSharded. --- src/mongo/db/sessions_collection_standalone.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/mongo/db/sessions_collection_standalone.cpp') diff --git a/src/mongo/db/sessions_collection_standalone.cpp b/src/mongo/db/sessions_collection_standalone.cpp index 32e93491fbf..25ae4db3dfa 100644 --- a/src/mongo/db/sessions_collection_standalone.cpp +++ b/src/mongo/db/sessions_collection_standalone.cpp @@ -100,7 +100,7 @@ Status SessionsCollectionStandalone::refreshSessions(OperationContext* opCtx, const LogicalSessionRecordSet& sessions) { DBDirectClient client(opCtx); return doRefresh(NamespaceString::kLogicalSessionsNamespace, - sessions, + std::vector(sessions.begin(), sessions.end()), makeSendFnForBatchWrite(NamespaceString::kLogicalSessionsNamespace, &client)); } @@ -108,16 +108,16 @@ Status SessionsCollectionStandalone::removeRecords(OperationContext* opCtx, const LogicalSessionIdSet& sessions) { DBDirectClient client(opCtx); return doRemove(NamespaceString::kLogicalSessionsNamespace, - sessions, + std::vector(sessions.begin(), sessions.end()), makeSendFnForBatchWrite(NamespaceString::kLogicalSessionsNamespace, &client)); } StatusWith SessionsCollectionStandalone::findRemovedSessions( OperationContext* opCtx, const LogicalSessionIdSet& sessions) { DBDirectClient client(opCtx); - return doFetch(NamespaceString::kLogicalSessionsNamespace, - sessions, - makeFindFnForCommand(NamespaceString::kLogicalSessionsNamespace, &client)); + return doFindRemoved(NamespaceString::kLogicalSessionsNamespace, + std::vector(sessions.begin(), sessions.end()), + makeFindFnForCommand(NamespaceString::kLogicalSessionsNamespace, &client)); } } // namespace mongo -- cgit v1.2.1