diff options
-rw-r--r-- | src/third_party/wiredtiger/import.data | 2 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/btree/bt_split.c | 4 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/include/btree_inline.h | 18 | ||||
-rw-r--r-- | src/third_party/wiredtiger/src/include/extern.h | 4 |
4 files changed, 12 insertions, 16 deletions
diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data index 8764c040c0e..818c8b86d79 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": "883889e71c4cbc77e820a4a62a02528ce6a16fde" + "commit": "5ded49670426c2ba9b4efed250f9bee228d2c69f" } diff --git a/src/third_party/wiredtiger/src/btree/bt_split.c b/src/third_party/wiredtiger/src/btree/bt_split.c index 1a07d4f9027..49ee037df80 100644 --- a/src/third_party/wiredtiger/src/btree/bt_split.c +++ b/src/third_party/wiredtiger/src/btree/bt_split.c @@ -1156,7 +1156,7 @@ __split_internal_lock(WT_SESSION_IMPL *session, WT_REF *ref, bool trylock, WT_PA * (which causes reconciliation to loop until the exclusive lock is resolved). If we want to * split the parent, give up to avoid that deadlock. */ - if (!trylock && !__wt_btree_can_evict_dirty(session)) + if (!trylock && __wt_btree_syncing_by_other_session(session)) return (__wt_set_return(session, EBUSY)); /* @@ -1272,7 +1272,7 @@ __split_parent_climb(WT_SESSION_IMPL *session, WT_PAGE *page) * tree we'll skip the newly created insert split chunk, but we'll write it upon finding it in a * different part of the tree. */ - if (!__wt_btree_can_evict_dirty(session)) { + if (__wt_btree_syncing_by_other_session(session)) { __split_internal_unlock(session, page); return (0); } 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); } diff --git a/src/third_party/wiredtiger/src/include/extern.h b/src/third_party/wiredtiger/src/include/extern.h index 0d13ff53d95..84630f39d4a 100644 --- a/src/third_party/wiredtiger/src/include/extern.h +++ b/src/third_party/wiredtiger/src/include/extern.h @@ -1910,12 +1910,12 @@ static inline WT_IKEY *__wt_ref_key_instantiated(WT_REF *ref) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); static inline WT_VISIBLE_TYPE __wt_txn_upd_visible_type(WT_SESSION_IMPL *session, WT_UPDATE *upd) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); -static inline bool __wt_btree_can_evict_dirty(WT_SESSION_IMPL *session) - WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); static inline bool __wt_btree_dominating_cache(WT_SESSION_IMPL *session, WT_BTREE *btree) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); static inline bool __wt_btree_lsm_over_size(WT_SESSION_IMPL *session, uint64_t maxsize) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); +static inline bool __wt_btree_syncing_by_other_session(WT_SESSION_IMPL *session) + WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); static inline bool __wt_cache_aggressive(WT_SESSION_IMPL *session) WT_GCC_FUNC_DECL_ATTRIBUTE((warn_unused_result)); static inline bool __wt_cache_full(WT_SESSION_IMPL *session) |