diff options
author | Luke Chen <luke.chen@mongodb.com> | 2022-08-08 11:53:59 +1000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-08-08 02:21:40 +0000 |
commit | 38b74b21473428c9180e9facfd46b93bb44193ff (patch) | |
tree | 4da1c3ebbc08afc2922b98f168fceef69535c9f2 | |
parent | 7f505680d2317e60b085bf61182db54e10e70e42 (diff) | |
download | mongo-38b74b21473428c9180e9facfd46b93bb44193ff.tar.gz |
Import wiredtiger: 7cfc9f4732503223c878f2ac404e18b9f327845e from branch mongodb-5.0
ref: f7fe74a143..7cfc9f4732
for: 5.0.11
WT-9477 Don't allow checkpoint triggering internal page split which leads to corrupted internal page in the checkpoint (#8046) (#8166)
-rw-r--r-- | src/third_party/wiredtiger/import.data | 2 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/btree/bt_split.c | 11 |
2 files changed, 10 insertions, 3 deletions
diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data index 4eafa95b214..5a7d6a5fbb7 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.0", - "commit": "f7fe74a1439a9fcc637ddf5304b36e3737182fe1" + "commit": "7cfc9f4732503223c878f2ac404e18b9f327845e" } diff --git a/src/third_party/wiredtiger/src/btree/bt_split.c b/src/third_party/wiredtiger/src/btree/bt_split.c index 05bac9aabe8..baa3a36456d 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_can_evict_dirty(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); } |