diff options
author | Luke Chen <luke.chen@mongodb.com> | 2023-03-28 15:56:22 +1100 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-03-28 05:19:11 +0000 |
commit | e8ca264315902d7963d29c788f541d3f1dba9309 (patch) | |
tree | df2d15ef558feb0fe45db79e2ebe55d4f4e48b46 | |
parent | ae2c512c0a4801bd4fed03161daa21b5ea86d3e0 (diff) | |
download | mongo-e8ca264315902d7963d29c788f541d3f1dba9309.tar.gz |
Import wiredtiger: b09743bdf8073e3bc9bbf5a67bc0d5c855188afa from branch mongodb-5.0
ref: c7cea9c71f..b09743bdf8
for: 5.0.16
WT-10062 Fix checkpoint cleanup not to skip internal pages
-rw-r--r-- | src/third_party/wiredtiger/import.data | 2 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/btree/bt_sync.c | 20 |
2 files changed, 18 insertions, 4 deletions
diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data index cc2630c0017..d83d3baab39 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": "c7cea9c71fc7cab71c2bd16e874b3d0cd2e89123" + "commit": "b09743bdf8073e3bc9bbf5a67bc0d5c855188afa" } diff --git a/src/third_party/wiredtiger/src/btree/bt_sync.c b/src/third_party/wiredtiger/src/btree/bt_sync.c index 7a0481aacdf..2236774fc8d 100644 --- a/src/third_party/wiredtiger/src/btree/bt_sync.c +++ b/src/third_party/wiredtiger/src/btree/bt_sync.c @@ -409,10 +409,24 @@ __sync_page_skip(WT_SESSION_IMPL *session, WT_REF *ref, void *context, bool *ski return (0); /* - * Skip reading the pages that are normal leaf pages or don't have an aggregated durable stop - * timestamp. + * The checkpoint cleanup fast deletes the obsolete leaf page by marking it as deleted + * in the internal page. To achieve this, + * + * 1. Checkpoint has to read all the internal pages that have obsolete leaf pages. + * To limit the reading of number of internal pages, the aggregated stop durable timestamp + * is checked except when the table is logged. Logged tables do not use timestamps. + * + * 2. Obsolete leaf pages with overflow keys/values cannot be fast deleted to free + * the overflow blocks. Read the page into cache and mark it dirty to remove the + * overflow blocks during reconciliation. + * + * FIXME: Read internal pages from non-logged tables when the remove/truncate + * operation is performed using no timestamp. */ - if (addr.type == WT_ADDR_LEAF_NO || addr.ta.newest_stop_durable_ts == WT_TS_NONE) { + if (addr.type == WT_ADDR_LEAF_NO || + ((!FLD_ISSET(S2C(session)->log_flags, WT_CONN_LOG_ENABLED) || + F_ISSET(S2BT(session), WT_BTREE_NO_LOGGING)) && + addr.ta.newest_stop_durable_ts == WT_TS_NONE)) { __wt_verbose(session, WT_VERB_CHECKPOINT_CLEANUP, "%p: page walk skipped", (void *)ref); WT_STAT_CONN_DATA_INCR(session, cc_pages_walk_skipped); *skipp = true; |