summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEtienne Petrel <etienne.petrel@mongodb.com>2022-09-15 23:26:46 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-09-16 00:09:12 +0000
commit38af3bf86eb1be7cea7870f26872ec1a19c9eec7 (patch)
tree4b05edfa43e381abfbf69f04b5df42bec9714e1e
parent351875ef285d81bdc363457feda56fe66384e189 (diff)
downloadmongo-38af3bf86eb1be7cea7870f26872ec1a19c9eec7.tar.gz
Import wiredtiger: 88a8cfc9307634879f155531cd2a79af703a887a from branch mongodb-master
ref: 2ba19fce21..88a8cfc930 for: 6.2.0-rc0 WT-9817 Column store tree open should always fetch the last page with global visibility (#8241)
-rw-r--r--src/third_party/wiredtiger/import.data2
-rw-r--r--src/third_party/wiredtiger/src/btree/bt_handle.c10
2 files changed, 8 insertions, 4 deletions
diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data
index 5bcfd0824e6..3118bd1b22c 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": "2ba19fce21cdcf23d4b17509baaf4ecfc55e4f96"
+ "commit": "88a8cfc9307634879f155531cd2a79af703a887a"
}
diff --git a/src/third_party/wiredtiger/src/btree/bt_handle.c b/src/third_party/wiredtiger/src/btree/bt_handle.c
index c1c1b7af166..8276692e147 100644
--- a/src/third_party/wiredtiger/src/btree/bt_handle.c
+++ b/src/third_party/wiredtiger/src/btree/bt_handle.c
@@ -853,9 +853,13 @@ __btree_get_last_recno(WT_SESSION_IMPL *session)
return (0);
}
- flags = WT_READ_PREV;
- if (!F_ISSET(session->txn, WT_TXN_HAS_SNAPSHOT))
- LF_SET(WT_READ_VISIBLE_ALL);
+ /*
+ * The endpoint for append is global; read the last page with global visibility to make sure
+ * that if the end of the tree is truncated we don't start appending in the truncated space
+ * unless the truncation has become globally visible. (Note that this path does not examine the
+ * visibility of individual data items; it only checks whether whole pages are deleted.)
+ */
+ flags = WT_READ_PREV | WT_READ_VISIBLE_ALL;
next_walk = NULL;
WT_RET(__wt_tree_walk(session, &next_walk, flags));