diff options
author | Cheahuychou Mao <mao.cheahuychou@gmail.com> | 2021-10-19 14:52:57 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-10-29 00:50:10 +0000 |
commit | ea197fd5193fe034174584e60290dd90fe01d2b1 (patch) | |
tree | ac2e923c5dc87fd4115293b60f6ed926433b078a /src/mongo/db/logical_session_id_helpers.cpp | |
parent | 5e8446f92d4826cfe2e8b9082efd0fbd540a9718 (diff) | |
download | mongo-ea197fd5193fe034174584e60290dd90fe01d2b1.tar.gz |
SERVER-58756 Store stmtIds for the operations in retryable internal transactions in applyOps oplog entries
Diffstat (limited to 'src/mongo/db/logical_session_id_helpers.cpp')
-rw-r--r-- | src/mongo/db/logical_session_id_helpers.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/db/logical_session_id_helpers.cpp b/src/mongo/db/logical_session_id_helpers.cpp index 525ed561db2..88f3a32874f 100644 --- a/src/mongo/db/logical_session_id_helpers.cpp +++ b/src/mongo/db/logical_session_id_helpers.cpp @@ -89,6 +89,10 @@ LogicalSessionId castToParentSessionId(const LogicalSessionId& sessionId) { return sessionId; } +bool isInternalSessionForRetryableWrite(const LogicalSessionId& sessionId) { + return sessionId.getTxnNumber().has_value(); +} + LogicalSessionId makeLogicalSessionId(const LogicalSessionFromClient& fromClient, OperationContext* opCtx, std::initializer_list<Privilege> allowSpoof) { |