diff options
author | Wenbin Zhu <wenbin.zhu@mongodb.com> | 2023-02-09 00:26:29 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-02-09 15:11:30 +0000 |
commit | e5ee746f9e459686d172ae99204f484e85652d49 (patch) | |
tree | e1b5b682ec18e74fbf1e640e75557d448373fbe3 /src/mongo/db/repl/oplog_entry.h | |
parent | 1d79792d701ab899165a7c56108633bbeac3c924 (diff) | |
download | mongo-e5ee746f9e459686d172ae99204f484e85652d49.tar.gz |
SERVER-72762 Split commit and abort entries during secondary oplog application.
Diffstat (limited to 'src/mongo/db/repl/oplog_entry.h')
-rw-r--r-- | src/mongo/db/repl/oplog_entry.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mongo/db/repl/oplog_entry.h b/src/mongo/db/repl/oplog_entry.h index eede3f30236..becd58a7aac 100644 --- a/src/mongo/db/repl/oplog_entry.h +++ b/src/mongo/db/repl/oplog_entry.h @@ -538,6 +538,13 @@ public: } /** + * Returns if this is a prepared 'abortTransaction' oplog entry. + */ + bool isPreparedAbort() const { + return getCommandType() == DurableOplogEntry::CommandType::kAbortTransaction; + } + + /** * Returns whether the oplog entry represents an applyOps which is a self-contained atomic * operation, or the last applyOps of an unprepared transaction, as opposed to part of a * prepared transaction or a non-final applyOps in a transaction. @@ -734,6 +741,7 @@ public: bool isPartialTransaction() const; bool isEndOfLargeTransaction() const; bool isPreparedCommit() const; + bool isPreparedAbort() const; bool isTerminalApplyOps() const; bool isSingleOplogEntryTransaction() const; bool isSingleOplogEntryTransactionWithCommand() const; |