summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuke Chen <luke.chen@mongodb.com>2022-06-23 16:01:54 +1000
committerLuke Chen <luke.chen@mongodb.com>2022-06-23 16:05:01 +1000
commit3b7c4577f242e1cadc19d5a4ba034861d15acc74 (patch)
treeaa0a11745109452f7750dfc77eb7842e4d735739 /src
parentdce8e9938f02f7cc18744050442c64ca69091558 (diff)
downloadmongo-3b7c4577f242e1cadc19d5a4ba034861d15acc74.tar.gz
Import wiredtiger: 31b70b7fe65536b44c77f07ed3815048673867f3 from branch mongodb-6.0
ref: 8fb2c7b2a6..31b70b7fe6 for: 6.0.0-rc11 WT-9477 Don't allow checkpoint triggering internal page split which leads to corrupted internal page in the checkpoint
Diffstat (limited to 'src')
-rw-r--r--src/third_party/wiredtiger/import.data2
-rw-r--r--src/third_party/wiredtiger/src/btree/bt_split.c11
2 files changed, 10 insertions, 3 deletions
diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data
index 8ede4cb0268..a797548eaec 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-6.0",
- "commit": "8fb2c7b2a69abe5de86c870b64ba2ee85eaf1ccb"
+ "commit": "31b70b7fe65536b44c77f07ed3815048673867f3"
}
diff --git a/src/third_party/wiredtiger/src/btree/bt_split.c b/src/third_party/wiredtiger/src/btree/bt_split.c
index 2c6f8449e3c..1fd13c47fe0 100644
--- a/src/third_party/wiredtiger/src/btree/bt_split.c
+++ b/src/third_party/wiredtiger/src/btree/bt_split.c
@@ -1271,8 +1271,15 @@ __split_parent_climb(WT_SESSION_IMPL *session, WT_PAGE *page)
* to a different part of the tree where it will be written; in other words, in one part of the
* tree we'll skip the newly created insert split chunk, but we'll write it upon finding it in a
* different part of the tree.
- */
- if (__wt_btree_syncing_by_other_session(session)) {
+ *
+ * Historically we allowed checkpoint itself to trigger an internal split here. That wasn't
+ * correct, since if that split climbs the tree above the immediate parent the checkpoint walk
+ * will potentially miss some internal pages. This is wrong as checkpoint needs to reconcile the
+ * entire internal tree structure. Non checkpoint cursor traversal doesn't care the internal
+ * tree structure as they just want to get the next leaf page correctly. Therefore, it is OK to
+ * split concurrently to cursor operations.
+ */
+ if (WT_BTREE_SYNCING(S2BT(session))) {
__split_internal_unlock(session, page);
return (0);
}