summaryrefslogtreecommitdiff
path: root/src/mongo/db/sessions_collection_sharded.cpp
diff options
context:
space:
mode:
authorJason Carey <jcarey@argv.me>2017-09-12 17:54:48 -0400
committerJason Carey <jcarey@argv.me>2017-09-20 12:09:23 -0400
commit79df037ceb43882726e9484b9ab8b1c23c538034 (patch)
treef885c270b723f35520bd357b626a43bb44a5c16f /src/mongo/db/sessions_collection_sharded.cpp
parent976371fdd34ade74f59ee9f3863bf9047421666e (diff)
downloadmongo-79df037ceb43882726e9484b9ab8b1c23c538034.tar.gz
SERVER-31011 Provide transaction record deletion hook
Diffstat (limited to 'src/mongo/db/sessions_collection_sharded.cpp')
-rw-r--r--src/mongo/db/sessions_collection_sharded.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/mongo/db/sessions_collection_sharded.cpp b/src/mongo/db/sessions_collection_sharded.cpp
index 6c35d317b26..544915c8494 100644
--- a/src/mongo/db/sessions_collection_sharded.cpp
+++ b/src/mongo/db/sessions_collection_sharded.cpp
@@ -34,6 +34,7 @@
#include "mongo/db/operation_context.h"
#include "mongo/db/query/canonical_query.h"
#include "mongo/db/query/query_request.h"
+#include "mongo/db/sessions_collection_rs.h"
#include "mongo/s/commands/cluster_write.h"
#include "mongo/s/query/cluster_find.h"
#include "mongo/s/write_ops/batch_write_exec.h"
@@ -71,7 +72,7 @@ Status SessionsCollectionSharded::refreshSessions(OperationContext* opCtx,
return Status(error, response.getErrMessage());
};
- return doRefresh(sessions, refreshTime, send);
+ return doRefresh(kSessionsNamespaceString, sessions, refreshTime, send);
}
Status SessionsCollectionSharded::removeRecords(OperationContext* opCtx,
@@ -94,7 +95,7 @@ Status SessionsCollectionSharded::removeRecords(OperationContext* opCtx,
return Status(error, response.getErrMessage());
};
- return doRemove(sessions, send);
+ return doRemove(kSessionsNamespaceString, sessions, send);
}
StatusWith<LogicalSessionIdSet> SessionsCollectionSharded::findRemovedSessions(
@@ -140,7 +141,12 @@ StatusWith<LogicalSessionIdSet> SessionsCollectionSharded::findRemovedSessions(
return result.obj();
};
- return doFetch(sessions, send);
+ return doFetch(kSessionsNamespaceString, sessions, send);
+}
+
+Status SessionsCollectionSharded::removeTransactionRecords(OperationContext* opCtx,
+ const LogicalSessionIdSet& sessions) {
+ return SessionsCollectionRS::removeTransactionRecordsHelper(opCtx, sessions);
}
} // namespace mongo