From 62616d131c0a574cc7fdaecbc54fa158d851c61c Mon Sep 17 00:00:00 2001 From: Luke Chen Date: Wed, 16 Nov 2022 15:19:26 +1100 Subject: Import wiredtiger: 9f60092c26a08601c2728269d3a42cd8a49b7d1d from branch mongodb-6.1 ref: f33fe0274f..9f60092c26 for: 6.1.1 WT-10064 Don't evict internal pages with non-globally visible deleted pages for non standalone build --- src/third_party/wiredtiger/import.data | 2 +- src/third_party/wiredtiger/src/reconcile/rec_child.c | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data index 1955b4480fe..0acaca373b2 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.1", - "commit": "f33fe0274f33f378b77f015c976889b0eed05197" + "commit": "9f60092c26a08601c2728269d3a42cd8a49b7d1d" } diff --git a/src/third_party/wiredtiger/src/reconcile/rec_child.c b/src/third_party/wiredtiger/src/reconcile/rec_child.c index 229413a6d48..c70a5118db2 100644 --- a/src/third_party/wiredtiger/src/reconcile/rec_child.c +++ b/src/third_party/wiredtiger/src/reconcile/rec_child.c @@ -112,6 +112,24 @@ __rec_child_deleted( * cells to the page. Copy out the current fast-truncate information for that function. */ if (!visible_all) { + if (!__wt_process.fast_truncate_2022) { + /* + * Internal pages with deletes that aren't globally visible cannot be evicted if we + * don't write the page_del information, we don't have sufficient information to restore + * the page's information if subsequently read (we wouldn't know which transactions + * should see the original page and which should see the deleted page). + */ + if (F_ISSET(r, WT_REC_EVICT)) + return (__wt_set_return(session, EBUSY)); + + /* + * It is wrong to leave the page clean after checkpoint if we cannot write the deleted + * pages to disk in eviction. If we do so, the next eviction will discard the page + * without reconcile it again and we lose the time point information of the non-obsolete + * deleted pages. + */ + r->leave_dirty = true; + } cmsp->del = *page_del; cmsp->state = WT_CHILD_PROXY; return (0); -- cgit v1.2.1