diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2019-10-31 16:38:01 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-10-31 16:38:01 +0000 |
commit | 1f94484d52064e12baedc7b586a8238d63560baf (patch) | |
tree | 5bb03cebfcb2d3137321b4762a0500f8831463dd /src/mongo/db/sessions_collection.cpp | |
parent | 7a3d17ea6b73bc916d94e59a44d5c1a56cbcb2e5 (diff) | |
download | mongo-1f94484d52064e12baedc7b586a8238d63560baf.tar.gz |
SERVER-42508 Get rid of some additional unused code in SessionsCollection
... and also improve comments.
Diffstat (limited to 'src/mongo/db/sessions_collection.cpp')
-rw-r--r-- | src/mongo/db/sessions_collection.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/mongo/db/sessions_collection.cpp b/src/mongo/db/sessions_collection.cpp index 21e5f55b8f4..98ab79de215 100644 --- a/src/mongo/db/sessions_collection.cpp +++ b/src/mongo/db/sessions_collection.cpp @@ -195,9 +195,9 @@ SessionsCollection::FindBatchFn SessionsCollection::makeFindFnForCommand(const N return send; } -void SessionsCollection::doRefresh(const NamespaceString& ns, - const std::vector<LogicalSessionRecord>& sessions, - SendBatchFn send) { +void SessionsCollection::_doRefresh(const NamespaceString& ns, + const std::vector<LogicalSessionRecord>& sessions, + SendBatchFn send) { auto init = [ns](BSONObjBuilder* batch) { batch->append("update", ns.coll()); batch->append("ordered", false); @@ -213,9 +213,9 @@ void SessionsCollection::doRefresh(const NamespaceString& ns, runBulkCmd("updates", init, add, send, sessions); } -void SessionsCollection::doRemove(const NamespaceString& ns, - const std::vector<LogicalSessionId>& sessions, - SendBatchFn send) { +void SessionsCollection::_doRemove(const NamespaceString& ns, + const std::vector<LogicalSessionId>& sessions, + SendBatchFn send) { auto init = [ns](BSONObjBuilder* batch) { batch->append("delete", ns.coll()); batch->append("ordered", false); @@ -229,9 +229,8 @@ void SessionsCollection::doRemove(const NamespaceString& ns, runBulkCmd("deletes", init, add, send, sessions); } -LogicalSessionIdSet SessionsCollection::doFindRemoved(const NamespaceString& ns, - const std::vector<LogicalSessionId>& sessions, - FindBatchFn send) { +LogicalSessionIdSet SessionsCollection::_doFindRemoved( + const NamespaceString& ns, const std::vector<LogicalSessionId>& sessions, FindBatchFn send) { auto makeT = [] { return std::vector<LogicalSessionId>{}; }; auto add = [](std::vector<LogicalSessionId>& batch, const LogicalSessionId& record) { |