summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/src/conn/conn_dhandle.c
diff options
context:
space:
mode:
authorLuke Chen <luke.chen@mongodb.com>2022-01-11 16:21:59 +1100
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-01-11 05:52:02 +0000
commit407ec649e0cfaee34883a398db5d8975954f519a (patch)
tree54bb739bbec9d7f42970956b9b62fd77341494f4 /src/third_party/wiredtiger/src/conn/conn_dhandle.c
parent27d3ffa2015d627751fac28d17ab3fa3661ff435 (diff)
downloadmongo-407ec649e0cfaee34883a398db5d8975954f519a.tar.gz
Import wiredtiger: e1427e4a69fa834ea3630523526379eaaef18c6c from branch mongodb-5.2
ref: 02329fa1d9..e1427e4a69 for: 5.2.0-rc5 WT-8598 Avoid checkpoint cleanup always on shutdown
Diffstat (limited to 'src/third_party/wiredtiger/src/conn/conn_dhandle.c')
-rw-r--r--src/third_party/wiredtiger/src/conn/conn_dhandle.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/third_party/wiredtiger/src/conn/conn_dhandle.c b/src/third_party/wiredtiger/src/conn/conn_dhandle.c
index efe3a852ef7..3ed40c84d83 100644
--- a/src/third_party/wiredtiger/src/conn/conn_dhandle.c
+++ b/src/third_party/wiredtiger/src/conn/conn_dhandle.c
@@ -377,8 +377,9 @@ __wt_conn_dhandle_close(WT_SESSION_IMPL *session, bool final, bool mark_dead)
* timestamp as needed and any remaining dirty data should be discarded.
*/
if (!discard && !marked_dead) {
- if (F_ISSET(conn, WT_CONN_CLOSING_TIMESTAMP) || F_ISSET(conn, WT_CONN_IN_MEMORY) ||
- F_ISSET(btree, WT_BTREE_NO_CHECKPOINT))
+ if ((F_ISSET(conn, WT_CONN_CLOSING_CHECKPOINT) &&
+ conn->txn_global.has_stable_timestamp) ||
+ F_ISSET(conn, WT_CONN_IN_MEMORY) || F_ISSET(btree, WT_BTREE_NO_CHECKPOINT))
discard = true;
else {
WT_TRET(__wt_checkpoint_close(session, final));