diff options
Diffstat (limited to 'src/third_party/wiredtiger/src/include/btree_inline.h')
-rw-r--r-- | src/third_party/wiredtiger/src/include/btree_inline.h | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/third_party/wiredtiger/src/include/btree_inline.h b/src/third_party/wiredtiger/src/include/btree_inline.h index fa7a51238f7..94c503e5d48 100644 --- a/src/third_party/wiredtiger/src/include/btree_inline.h +++ b/src/third_party/wiredtiger/src/include/btree_inline.h @@ -1485,21 +1485,17 @@ __wt_page_del_active(WT_SESSION_IMPL *session, WT_REF *ref, bool visible_all) } /* - * __wt_btree_can_evict_dirty -- - * Check whether eviction of dirty pages or splits are permitted in the current tree. We cannot - * evict dirty pages or split while a checkpoint is in progress, unless the checkpoint thread is - * doing the work. Also, during connection close, if we take a checkpoint as of a timestamp, - * eviction should not write dirty pages to avoid updates newer than the checkpoint timestamp - * leaking to disk. + * __wt_btree_syncing_by_other_session -- + * Returns true if the session's current btree is being synced by another thread. */ static inline bool -__wt_btree_can_evict_dirty(WT_SESSION_IMPL *session) +__wt_btree_syncing_by_other_session(WT_SESSION_IMPL *session) { WT_BTREE *btree; btree = S2BT(session); - return ((!WT_BTREE_SYNCING(btree) || WT_SESSION_BTREE_SYNC(session)) && - !F_ISSET(S2C(session), WT_CONN_CLOSING_TIMESTAMP)); + + return (WT_BTREE_SYNCING(btree) && !WT_SESSION_BTREE_SYNC(session)); } /* @@ -1680,7 +1676,7 @@ __wt_page_can_evict(WT_SESSION_IMPL *session, WT_REF *ref, bool *inmem_splitp) * historical tables, reconciliation no longer writes overflow cookies on internal pages, no * matter the size of the key.) */ - if (!__wt_btree_can_evict_dirty(session) && + if (__wt_btree_syncing_by_other_session(session) && F_ISSET_ATOMIC_16(ref->home, WT_PAGE_INTL_OVERFLOW_KEYS)) return (false); @@ -1702,7 +1698,7 @@ __wt_page_can_evict(WT_SESSION_IMPL *session, WT_REF *ref, bool *inmem_splitp) * written and the previous version freed, that previous version might be referenced by an * internal page already written in the checkpoint, leaving the checkpoint inconsistent. */ - if (modified && !__wt_btree_can_evict_dirty(session)) { + if (modified && __wt_btree_syncing_by_other_session(session)) { WT_STAT_CONN_DATA_INCR(session, cache_eviction_checkpoint); return (false); } |