diff options
author | Tess Avitabile <tess.avitabile@mongodb.com> | 2018-03-12 12:15:25 -0400 |
---|---|---|
committer | Tess Avitabile <tess.avitabile@mongodb.com> | 2018-03-13 17:16:38 -0400 |
commit | a3909e15cf23edff53fdeb2ac3203e05d5ed9737 (patch) | |
tree | 60e9ef4b06ce0a32e02593272fb095767fa5600c /src/mongo/db/session.h | |
parent | 136afe99292bdc5a1e2291b7e53a7c660f4544c3 (diff) | |
download | mongo-a3909e15cf23edff53fdeb2ac3203e05d5ed9737.tar.gz |
SERVER-33689 killCursors on snapshot read cursor should free stashed transaction resources
Diffstat (limited to 'src/mongo/db/session.h')
-rw-r--r-- | src/mongo/db/session.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mongo/db/session.h b/src/mongo/db/session.h index 3496cf2aa57..64d1aeefd88 100644 --- a/src/mongo/db/session.h +++ b/src/mongo/db/session.h @@ -69,6 +69,8 @@ public: */ TxnResources(OperationContext* opCtx); + ~TxnResources(); + /** * Releases stashed transaction state onto 'opCtx'. Must only be called once. */ @@ -217,6 +219,12 @@ public: */ void unstashTransactionResources(OperationContext* opCtx); + /** + * If there is transaction in progress with transaction number 'txnNumber' and _autocommit=true, + * aborts the transaction. + */ + void abortIfSnapshotRead(OperationContext* opCtx, TxnNumber txnNumber); + bool getAutocommit() const { return _autocommit; } |