summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Chen <luke.chen@mongodb.com>2022-11-21 14:15:41 +1100
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-11-21 03:50:47 +0000
commit168b40f0ffb04aafc27c5c55dc4f6e996b4a8a7f (patch)
tree5c65e0105f03c83fa3aab399edde52635d6aab06
parent39881664f2a9478b2ed2aeb860448fb3c6291ab0 (diff)
downloadmongo-168b40f0ffb04aafc27c5c55dc4f6e996b4a8a7f.tar.gz
Import wiredtiger: 0efbb249a0a79f504cf3be03129973e2fbb6f428 from branch mongodb-6.2
ref: 5ade1afb83..0efbb249a0 for: 6.2.0-rc2 WT-10062 Fix checkpoint cleanup not to skip internal pages
-rw-r--r--src/third_party/wiredtiger/import.data4
-rw-r--r--src/third_party/wiredtiger/src/btree/bt_sync.c18
2 files changed, 17 insertions, 5 deletions
diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data
index 3ff1ffa7eb8..ea47a5ee94d 100644
--- a/src/third_party/wiredtiger/import.data
+++ b/src/third_party/wiredtiger/import.data
@@ -1,6 +1,6 @@
{
"vendor": "wiredtiger",
"github": "wiredtiger/wiredtiger.git",
- "branch": "mongodb-master",
- "commit": "5ade1afb8313b7eaeb7e0b14271d0f88e483bd62"
+ "branch": "mongodb-6.2",
+ "commit": "0efbb249a0a79f504cf3be03129973e2fbb6f428"
}
diff --git a/src/third_party/wiredtiger/src/btree/bt_sync.c b/src/third_party/wiredtiger/src/btree/bt_sync.c
index abb1ee86a52..509c2f904d8 100644
--- a/src/third_party/wiredtiger/src/btree/bt_sync.c
+++ b/src/third_party/wiredtiger/src/btree/bt_sync.c
@@ -385,10 +385,22 @@ __sync_page_skip(
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 ||
+ (!F_ISSET(S2BT(session), WT_BTREE_LOGGED) && addr.ta.newest_stop_durable_ts == WT_TS_NONE)) {
__wt_verbose_debug2(
session, WT_VERB_CHECKPOINT_CLEANUP, "%p: page walk skipped", (void *)ref);
WT_STAT_CONN_DATA_INCR(session, cc_pages_walk_skipped);