diff options
author | Blake Oler <blake.oler@mongodb.com> | 2019-07-29 16:52:52 -0400 |
---|---|---|
committer | Blake Oler <blake.oler@mongodb.com> | 2019-07-31 10:54:11 -0400 |
commit | 381bb2c51c74b82f01b269b0f187d75b9b5c8adc (patch) | |
tree | 7924b8a9bfe4ea5908444c11e6394aac7a15d6b9 /src/mongo/s/transaction_router.h | |
parent | c6ec415752c8398f588491d8af1c54ee4e7fcbb4 (diff) | |
download | mongo-381bb2c51c74b82f01b269b0f187d75b9b5c8adc.tar.gz |
SERVER-42457 Check if atClusterTime has been set on TransactionRouter before observing from an external thread
Diffstat (limited to 'src/mongo/s/transaction_router.h')
-rw-r--r-- | src/mongo/s/transaction_router.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mongo/s/transaction_router.h b/src/mongo/s/transaction_router.h index 82e7498523a..cf225ef0f9c 100644 --- a/src/mongo/s/transaction_router.h +++ b/src/mongo/s/transaction_router.h @@ -171,6 +171,11 @@ public: LogicalTime getTime() const; /** + * Returns true if the _atClusterTime has been changed from the default uninitialized value. + */ + bool timeHasBeenSet() const; + + /** * Sets the timestamp and remembers the statement id of the command that set it. */ void setTime(LogicalTime atClusterTime, StmtId currentStmtId); @@ -403,6 +408,11 @@ public: BSONObj _handOffCommitToCoordinator(OperationContext* opCtx); /** + * Returns true if the atClusterTime has been changed from the default uninitialized value. + */ + bool _atClusterTimeHasBeenSet() const; + + /** * Sets the given logical time as the atClusterTime for the transaction to be the greater of * the given time and the user's afterClusterTime, if one was provided. */ |