diff options
author | Luke Chen <luke.chen@mongodb.com> | 2023-04-03 11:26:25 +1000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-04-03 01:41:52 +0000 |
commit | a33905827de242473e4b58ff49c7584c4484331e (patch) | |
tree | 318ac3f312d26ada9e49663408966b97526bde8e | |
parent | e0ea599a400925d17bc6c5a1e6e215091dc56e58 (diff) | |
download | mongo-a33905827de242473e4b58ff49c7584c4484331e.tar.gz |
Import wiredtiger: 3decc745ece9155d004ca447b72cb5c8122847eb from branch mongodb-4.4
ref: da05d32624..3decc745ec
for: 4.4.20
WT-8651 Allow checkpoint scrubbing during shutdown
-rw-r--r-- | src/third_party/wiredtiger/import.data | 2 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/txn/txn_ckpt.c | 16 |
2 files changed, 8 insertions, 10 deletions
diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data index 52705aef1eb..910ee19e10e 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": "da05d32624edbb483b452e3b1917b3df08589af0" + "commit": "3decc745ece9155d004ca447b72cb5c8122847eb" } diff --git a/src/third_party/wiredtiger/src/txn/txn_ckpt.c b/src/third_party/wiredtiger/src/txn/txn_ckpt.c index be072499e36..574ff3453eb 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) |