diff options
author | Jack Mulrow <jack.mulrow@mongodb.com> | 2022-03-21 03:20:43 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-03-30 19:07:32 +0000 |
commit | 8775f61d11bbb49f191e6e1e2713b8a6b5aef73a (patch) | |
tree | 1f6e22dedf273fa8822d28b772b2b2c84f7e587c /src/mongo/db/session_catalog.h | |
parent | 2ab888c8fe45f88ce9509a3690e083ad5f35e418 (diff) | |
download | mongo-8775f61d11bbb49f191e6e1e2713b8a6b5aef73a.tar.gz |
SERVER-63495 Unyielding TransactionRouter never fails except at shutdown and support yielding in cluster commands
Diffstat (limited to 'src/mongo/db/session_catalog.h')
-rw-r--r-- | src/mongo/db/session_catalog.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mongo/db/session_catalog.h b/src/mongo/db/session_catalog.h index a744e067907..9d4ec1aa890 100644 --- a/src/mongo/db/session_catalog.h +++ b/src/mongo/db/session_catalog.h @@ -249,6 +249,10 @@ public: return *get(); } + bool wasCheckedOutForKill() const { + return bool(_killToken); + } + private: // The owning session catalog into which the session should be checked back SessionCatalog& _catalog; @@ -431,7 +435,8 @@ public: * Check-in may only be called if the session has actually been checked out previously and * similarly check-out may only be called if the session is not checked out already. */ - static void checkIn(OperationContext* opCtx); + enum class CheckInReason { kDone, kYield }; + static void checkIn(OperationContext* opCtx, CheckInReason reason); static void checkOut(OperationContext* opCtx); private: |