diff options
author | Jennifer Peshansky <jennifer.peshansky@mongodb.com> | 2022-11-03 16:13:20 +0000 |
---|---|---|
committer | Jennifer Peshansky <jennifer.peshansky@mongodb.com> | 2022-11-03 16:13:20 +0000 |
commit | e74d2910bbe76790ad131d53fee277829cd95982 (patch) | |
tree | cabe148764529c9623652374fbc36323a550cd44 /src/third_party/wiredtiger/src/reconcile/rec_child.c | |
parent | 280145e9940729480bb8a35453d4056afac87641 (diff) | |
parent | ba467f46cc1bc49965e1d72b541eff0cf1d7b22e (diff) | |
download | mongo-jenniferpeshansky/SERVER-70854.tar.gz |
Merge branch 'master' into jenniferpeshansky/SERVER-70854jenniferpeshansky/SERVER-70854
Diffstat (limited to 'src/third_party/wiredtiger/src/reconcile/rec_child.c')
-rw-r--r-- | src/third_party/wiredtiger/src/reconcile/rec_child.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/src/third_party/wiredtiger/src/reconcile/rec_child.c b/src/third_party/wiredtiger/src/reconcile/rec_child.c index 653f14a0b57..87fcd4ff1ea 100644 --- a/src/third_party/wiredtiger/src/reconcile/rec_child.c +++ b/src/third_party/wiredtiger/src/reconcile/rec_child.c @@ -44,8 +44,8 @@ __rec_child_deleted( /* * If an earlier reconciliation chose to write the fast truncate information to the page, we - * should select it regardless of visibility unless it is visible globally visible. This is - * important as it is never ok to shift the on-disk value backwards. + * should select it regardless of visibility unless it is globally visible. This is important as + * it is never ok to shift the on-disk value backwards. */ if (page_del->selected_for_write && !visible_all) { cmsp->del = *page_del; @@ -125,6 +125,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; page_del->selected_for_write = true; |