summaryrefslogtreecommitdiff
path: root/src/mongo/db/sessions_collection_rs.h
diff options
context:
space:
mode:
authorsamantharitter <samantha.ritter@10gen.com>2017-10-17 11:23:25 -0400
committersamantharitter <samantha.ritter@10gen.com>2017-10-18 14:01:38 -0400
commit44c55f0c94a5e6229c3d2eeabe1708222c3173e4 (patch)
tree30b0013e476fdb34fbc43964882a940ee14f39f5 /src/mongo/db/sessions_collection_rs.h
parenteccd69575e4887e53ba299f4c0cb1c2e876b1bb8 (diff)
downloadmongo-44c55f0c94a5e6229c3d2eeabe1708222c3173e4.tar.gz
SERVER-31534 Do not call callbacks under locks in SessionsCollectionRS
Diffstat (limited to 'src/mongo/db/sessions_collection_rs.h')
-rw-r--r--src/mongo/db/sessions_collection_rs.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/mongo/db/sessions_collection_rs.h b/src/mongo/db/sessions_collection_rs.h
index 88645bed5ad..ac2563cdee8 100644
--- a/src/mongo/db/sessions_collection_rs.h
+++ b/src/mongo/db/sessions_collection_rs.h
@@ -61,21 +61,44 @@ public:
/**
* Updates the last-use times on the given sessions to be greater than
* or equal to the current time.
+ *
+ * If a step-down happens on this node as this method is running, it may fail.
*/
Status refreshSessions(OperationContext* opCtx,
const LogicalSessionRecordSet& sessions) override;
/**
* Removes the authoritative records for the specified sessions.
+ *
+ * If a step-down happens on this node as this method is running, it may fail.
*/
Status removeRecords(OperationContext* opCtx, const LogicalSessionIdSet& sessions) override;
+ /**
+ * Returns the subset of sessions from the given set that do not have entries
+ * in the sessions collection.
+ *
+ * If a step-down happens on this node as this method is running, it may
+ * return stale results.
+ */
StatusWith<LogicalSessionIdSet> findRemovedSessions(
OperationContext* opCtx, const LogicalSessionIdSet& sessions) override;
+ /**
+ * Removes the transaction records for the specified sessions from the
+ * transaction table.
+ *
+ * If a step-down happens on this node as this method is running, it may fail.
+ */
Status removeTransactionRecords(OperationContext* opCtx,
const LogicalSessionIdSet& sessions) override;
+ /**
+ * Helper for a shard server to run its transaction operations as a replica set
+ * member.
+ *
+ * If a step-down happens on this node as this method is running, it may fail.
+ */
static Status removeTransactionRecordsHelper(OperationContext* opCtx,
const LogicalSessionIdSet& sessions);
};