summaryrefslogtreecommitdiff
path: root/src/mongo/db/op_observer.h
diff options
context:
space:
mode:
authorBlake Oler <blake.oler@mongodb.com>2019-01-17 14:31:00 -0500
committerBlake Oler <blake.oler@mongodb.com>2019-02-01 14:16:52 -0500
commitb8bfe9ff391ebeb10a5c2fb86979d854d17d0fd5 (patch)
tree86f50503bc3e5e7c51ff2cb0ed42338ad73c6e39 /src/mongo/db/op_observer.h
parent8387824b3ac937b0489fcb94c590cc663b47348c (diff)
downloadmongo-b8bfe9ff391ebeb10a5c2fb86979d854d17d0fd5.tar.gz
SERVER-39017 Allow prepared transaction statements to persist in-memory until commit
Diffstat (limited to 'src/mongo/db/op_observer.h')
-rw-r--r--src/mongo/db/op_observer.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/mongo/db/op_observer.h b/src/mongo/db/op_observer.h
index 682a6f0311d..b0f187adb4f 100644
--- a/src/mongo/db/op_observer.h
+++ b/src/mongo/db/op_observer.h
@@ -287,18 +287,25 @@ public:
* If the transaction was prepared, then 'commitOplogEntryOpTime' is passed in to be used as the
* OpTime of the oplog entry. The 'commitTimestamp' is the timestamp at which the multi-document
* transaction was committed. Either these fields should both be 'none' or neither should.
+ *
+ * The 'statements' are the list of CRUD operations to be applied in this transaction.
*/
virtual void onTransactionCommit(OperationContext* opCtx,
boost::optional<OplogSlot> commitOplogEntryOpTime,
- boost::optional<Timestamp> commitTimestamp) = 0;
+ boost::optional<Timestamp> commitTimestamp,
+ std::vector<repl::ReplOperation>& statements) = 0;
/**
* The onTransactionPrepare method is called when an atomic transaction is prepared. It must be
* called when a transaction is active.
*
* The 'prepareOpTime' is passed in to be used as the OpTime of the oplog entry.
+ *
+ * The 'statements' are the list of CRUD operations to be applied in this transaction.
*/
- virtual void onTransactionPrepare(OperationContext* opCtx, const OplogSlot& prepareOpTime) = 0;
+ virtual void onTransactionPrepare(OperationContext* opCtx,
+ const OplogSlot& prepareOpTime,
+ std::vector<repl::ReplOperation>& statements) = 0;
/**
* The onTransactionAbort method is called when an atomic transaction aborts, before the