summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Chen <luke.chen@mongodb.com>2022-01-11 12:07:14 +1100
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-01-11 01:44:40 +0000
commitd70aeb47529f81f56eb7d839ae71e4a1c149674b (patch)
tree70f08746859752b79beaf215bec1b59f2fac28a6
parent7f8e34efd36787466c4acfcbf3c6f2eebc41a1b4 (diff)
downloadmongo-d70aeb47529f81f56eb7d839ae71e4a1c149674b.tar.gz
Import wiredtiger: 4e5a6281aeca1bcc78639fb8ff7f05f2c54fde41 from branch mongodb-5.2
ref: d1e3d80d51..4e5a6281ae for: 5.2.0-rc5 WT-8617 Temporary fix for transaction snapshot assert.
-rw-r--r--src/third_party/wiredtiger/import.data2
-rw-r--r--src/third_party/wiredtiger/src/include/txn_inline.h5
2 files changed, 4 insertions, 3 deletions
diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data
index 5237b6ce7a5..5a4218b0fe8 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-5.2",
- "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));