summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChenhao Qu <chenhao.qu@mongodb.com>2022-01-12 21:38:20 +1100
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-01-12 11:09:45 +0000
commit029e3a0ebd584a501f3431ad34262f31325f5e39 (patch)
treecb404b1d38fbecbd562a1fa57fe61b7cf323c297
parenta4a290b43ddaebdd0dd98cfeb869ab0bb6476daf (diff)
downloadmongo-029e3a0ebd584a501f3431ad34262f31325f5e39.tar.gz
Import wiredtiger: b8aee83e55abb299c6a8476baeaa82c0221a6719 from branch mongodb-master
ref: 83e4d3a21b..b8aee83e55 for: 5.3.0 WT-8651 Allow checkpoint scrub during shutdown
-rw-r--r--src/third_party/wiredtiger/import.data2
-rw-r--r--src/third_party/wiredtiger/src/txn/txn_ckpt.c16
2 files changed, 8 insertions, 10 deletions
diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data
index 6bad26d9cd9..a7d8a9aeac7 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-master",
- "commit": "83e4d3a21b49584a77004ee586ee58a6c428b5c6"
+ "commit": "b8aee83e55abb299c6a8476baeaa82c0221a6719"
}
diff --git a/src/third_party/wiredtiger/src/txn/txn_ckpt.c b/src/third_party/wiredtiger/src/txn/txn_ckpt.c
index 31b01b21e3d..9c95306f202 100644
--- a/src/third_party/wiredtiger/src/txn/txn_ckpt.c
+++ b/src/third_party/wiredtiger/src/txn/txn_ckpt.c
@@ -335,11 +335,12 @@ __wt_checkpoint_get_handles(WT_SESSION_IMPL *session, const char *cfg[])
}
/*
- * __checkpoint_reduce_dirty_cache --
- * Release clean trees from the list cached for checkpoints.
+ * __checkpoint_wait_reduce_dirty_cache --
+ * Try to reduce the amount of dirty data in cache so there is less work do during the critical
+ * section of the checkpoint.
*/
static void
-__checkpoint_reduce_dirty_cache(WT_SESSION_IMPL *session)
+__checkpoint_wait_reduce_dirty_cache(WT_SESSION_IMPL *session)
{
WT_CACHE *cache;
WT_CONNECTION_IMPL *conn;
@@ -352,11 +353,8 @@ __checkpoint_reduce_dirty_cache(WT_SESSION_IMPL *session)
conn = S2C(session);
cache = conn->cache;
- /*
- * Give up if scrubbing is disabled, including when checkpointing with a timestamp on close (we
- * can't evict dirty pages in that case, so scrubbing cannot help).
- */
- if (F_ISSET(conn, WT_CONN_CLOSING_TIMESTAMP) || cache->eviction_checkpoint_target < DBL_EPSILON)
+ /* Give up if scrubbing is disabled. */
+ if (cache->eviction_checkpoint_target < DBL_EPSILON)
return;
time_start = __wt_clock(session);
@@ -855,7 +853,7 @@ __txn_checkpoint(WT_SESSION_IMPL *session, const char *cfg[])
* Try to reduce the amount of dirty data in cache so there is less work do during the critical
* section of the checkpoint.
*/
- __checkpoint_reduce_dirty_cache(session);
+ __checkpoint_wait_reduce_dirty_cache(session);
/* Tell logging that we are about to start a database checkpoint. */
if (full && logging)