summaryrefslogtreecommitdiff
path: root/src/mongo/db/sessions_collection_standalone.cpp
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2019-05-03 16:21:24 -0400
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2019-05-09 07:40:56 -0400
commit2791817876636c0cfd60d867f31c7a83cf3f18c1 (patch)
tree3aefcb1999cccf4cb53b2401a44857549ba8722a /src/mongo/db/sessions_collection_standalone.cpp
parent1b8a9f5dc5c3314042b55e7415a2a25045b32a94 (diff)
downloadmongo-2791817876636c0cfd60d867f31c7a83cf3f18c1.tar.gz
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.
Diffstat (limited to 'src/mongo/db/sessions_collection_standalone.cpp')
-rw-r--r--src/mongo/db/sessions_collection_standalone.cpp10
1 files changed, 5 insertions, 5 deletions
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<LogicalSessionIdSet> 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