summaryrefslogtreecommitdiff
path: root/src/mongo/db/session_catalog_mongod.h
diff options
context:
space:
mode:
authorMatthew Russotto <matthew.russotto@mongodb.com>2021-03-11 11:53:14 -0500
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-03-11 17:14:46 +0000
commit9234a98e641c4fe88bd37b5e39f6523e7167b61c (patch)
tree8d275977531bef19347e6d0d7af0580f84331220 /src/mongo/db/session_catalog_mongod.h
parent8a139e9482632def38281aacddb6d12c02a6f26e (diff)
downloadmongo-9234a98e641c4fe88bd37b5e39f6523e7167b61c.tar.gz
SERVER-53509 Create an oplog chain and update config.transactions for retryable writes
Diffstat (limited to 'src/mongo/db/session_catalog_mongod.h')
-rw-r--r--src/mongo/db/session_catalog_mongod.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mongo/db/session_catalog_mongod.h b/src/mongo/db/session_catalog_mongod.h
index cd379edb8ec..a373b9c218c 100644
--- a/src/mongo/db/session_catalog_mongod.h
+++ b/src/mongo/db/session_catalog_mongod.h
@@ -121,4 +121,21 @@ private:
OperationContext* const _opCtx;
};
+/**
+ * Similar to MongoDOperationContextSession, but marks the TransactionParticipant as valid without
+ * loading the retryable write oplog history. If the last operation was a multi-document
+ * transaction, is equivalent to MongoDOperationContextSession.
+ *
+ * NOTE: Should only be used when reading the oplog history is not possible.
+ */
+class MongoDOperationContextSessionWithoutOplogRead {
+public:
+ MongoDOperationContextSessionWithoutOplogRead(OperationContext* opCtx);
+ ~MongoDOperationContextSessionWithoutOplogRead();
+
+private:
+ OperationContextSession _operationContextSession;
+ OperationContext* const _opCtx;
+};
+
} // namespace mongo