From 7d70b156eb30a857b372f671dc078173f66810b5 Mon Sep 17 00:00:00 2001 From: Etienne Petrel Date: Tue, 4 Jan 2022 06:11:23 +0000 Subject: Import wiredtiger: 4e5a6281aeca1bcc78639fb8ff7f05f2c54fde41 from branch mongodb-master ref: d1e3d80d51..4e5a6281ae for: 5.3.0 WT-8617 Temporary fix for transaction snapshot assert. --- src/third_party/wiredtiger/import.data | 2 +- src/third_party/wiredtiger/src/include/txn_inline.h | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data index 23b710ea98c..c6adc41230d 100644 --- a/src/third_party/wiredtiger/import.data +++ b/src/third_party/wiredtiger/import.data @@ -2,5 +2,5 @@ "vendor": "wiredtiger", "github": "wiredtiger/wiredtiger.git", "branch": "mongodb-master", - "commit": "d1e3d80d51130e3ff7003a88dc1e388090761f63" + "commit": "4e5a6281aeca1bcc78639fb8ff7f05f2c54fde41" } diff --git a/src/third_party/wiredtiger/src/include/txn_inline.h b/src/third_party/wiredtiger/src/include/txn_inline.h index 96717ab4f92..ccfae2af21d 100644 --- a/src/third_party/wiredtiger/src/include/txn_inline.h +++ b/src/third_party/wiredtiger/src/include/txn_inline.h @@ -716,8 +716,9 @@ __txn_visible_id(WT_SESSION_IMPL *session, uint64_t id) if (txn->isolation == WT_ISO_READ_UNCOMMITTED) return (true); - /* Otherwise, we should be called with a snapshot. */ - WT_ASSERT(session, F_ISSET(txn, WT_TXN_HAS_SNAPSHOT) || session->dhandle->checkpoint != NULL); + /* Otherwise, we need a snapshot; if we don't have one, assume a test for global visibility. */ + if (!F_ISSET(txn, WT_TXN_HAS_SNAPSHOT)) + return (__txn_visible_all_id(session, id)); return (__wt_txn_visible_id_snapshot( id, txn->snap_min, txn->snap_max, txn->snapshot, txn->snapshot_count)); -- cgit v1.2.1