summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChenhao Qu <chenhao.qu@mongodb.com>2020-07-15 04:47:17 +0000
committerChenhao Qu <chenhao.qu@mongodb.com>2020-07-15 04:47:17 +0000
commit4156b1f1954b82f5839bd74e36a0155d48ff775c (patch)
tree7a0e9b32ba490e4c31f857f2dac07e379b4b0f6c
parent383e442b881c089afebaea1d11aeec196f8efc56 (diff)
downloadmongo-4156b1f1954b82f5839bd74e36a0155d48ff775c.tar.gz
Import wiredtiger: 8092bf0a392191e14fe39d8d8503a2f627d5d2a8 from branch mongodb-4.4
ref: 8acea6fe10..8092bf0a39 for: 4.4.0-rc14 WT-6521 Don't perform checkpoint cleanup during server startup and shutdown phase
-rw-r--r--src/third_party/wiredtiger/import.data2
-rw-r--r--src/third_party/wiredtiger/src/btree/bt_sync.c19
2 files changed, 17 insertions, 4 deletions
diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data
index 15373f008ba..86428858f26 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-4.4",
- "commit": "8acea6fe103142cd859a672546b64ca8711b1777"
+ "commit": "8092bf0a392191e14fe39d8d8503a2f627d5d2a8"
}
diff --git a/src/third_party/wiredtiger/src/btree/bt_sync.c b/src/third_party/wiredtiger/src/btree/bt_sync.c
index af2e22f7582..b897ce6bbbd 100644
--- a/src/third_party/wiredtiger/src/btree/bt_sync.c
+++ b/src/third_party/wiredtiger/src/btree/bt_sync.c
@@ -388,7 +388,16 @@ __sync_page_skip(WT_SESSION_IMPL *session, WT_REF *ref, void *context, bool *ski
if (ref->state != WT_REF_DISK)
return (0);
- /* Check whether this ref has any possible updates to be aborted. */
+ /* Don't read pages into cache during startup or shutdown phase. */
+ if (F_ISSET(S2C(session), WT_CONN_RECOVERING | WT_CONN_CLOSING_TIMESTAMP)) {
+ *skipp = true;
+ return (0);
+ }
+
+ /*
+ * Ignore the pages with no on-disk address. It is possible that a page with deleted state may
+ * not have an on-disk address.
+ */
if (!__wt_ref_addr_copy(session, ref, &addr))
return (0);
@@ -553,8 +562,12 @@ __wt_sync_file(WT_SESSION_IMPL *session, WT_CACHE_OP syncop)
if (walk == NULL)
break;
- /* Traverse through the internal page for obsolete child pages. */
- if (F_ISSET(walk, WT_REF_FLAG_INTERNAL)) {
+ /*
+ * Perform checkpoint cleanup when not in startup or shutdown phase by traversing
+ * through internal pages looking for obsolete child pages.
+ */
+ if (!F_ISSET(conn, WT_CONN_RECOVERING | WT_CONN_CLOSING_TIMESTAMP) &&
+ F_ISSET(walk, WT_REF_FLAG_INTERNAL)) {
WT_WITH_PAGE_INDEX(
session, ret = __sync_ref_int_obsolete_cleanup(session, walk, &ref_list));
WT_ERR(ret);