diff options
author | Luke Chen <luke.chen@mongodb.com> | 2021-12-30 15:53:31 +1100 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-12-30 05:17:45 +0000 |
commit | 23bf8408394c73fc143a8093105a688865f5cd4a (patch) | |
tree | 61aa2c5253a4b83da4765a5c3f92d5851ce5cc9f /src/third_party/wiredtiger/src/session | |
parent | 0e2080602ffde7d9ece324f5edef1ffaa6d6d19e (diff) | |
download | mongo-23bf8408394c73fc143a8093105a688865f5cd4a.tar.gz |
Import wiredtiger: 58aba8adeaf57b85bdd869d55a519286628ecff8 from branch mongodb-master
ref: 06f6747bcb..58aba8adea
for: 5.3.0
WT-8543 Rollback-to-stable should detect a prepared transaction as an active transaction and fail
Diffstat (limited to 'src/third_party/wiredtiger/src/session')
-rw-r--r-- | src/third_party/wiredtiger/src/session/session_api.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/third_party/wiredtiger/src/session/session_api.c b/src/third_party/wiredtiger/src/session/session_api.c index 74e2cdab612..0406ce7d1ce 100644 --- a/src/third_party/wiredtiger/src/session/session_api.c +++ b/src/third_party/wiredtiger/src/session/session_api.c @@ -321,9 +321,6 @@ __wt_session_close_internal(WT_SESSION_IMPL *session) /* Discard metadata tracking. */ __wt_meta_track_discard(session); - /* Free transaction information. */ - __wt_txn_destroy(session); - /* * Close the file where we tracked long operations. Do this before releasing resources, as we do * scratch buffer management when we flush optrack buffers to disk. @@ -344,6 +341,12 @@ __wt_session_close_internal(WT_SESSION_IMPL *session) /* The API lock protects opening and closing of sessions. */ __wt_spin_lock(session, &conn->api_lock); + /* + * Free transaction information: inside the lock because we're freeing the WT_TXN structure and + * RTS looks at it. + */ + __wt_txn_destroy(session); + /* Decrement the count of open sessions. */ WT_STAT_CONN_DECR(session, session_open); |