diff options
Diffstat (limited to 'src/btree/bt_read.c')
-rw-r--r-- | src/btree/bt_read.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/btree/bt_read.c b/src/btree/bt_read.c index 679f20bdac5..90188498535 100644 --- a/src/btree/bt_read.c +++ b/src/btree/bt_read.c @@ -327,25 +327,28 @@ __evict_force_check(WT_SESSION_IMPL *session, WT_REF *ref) if (__wt_hazard_count(session, page) > 1) return (false); + /* If we can do an in-memory split, do it. */ + if (__wt_leaf_page_can_split(session, page)) + return (true); + if (page->memory_footprint < btree->maxmempage) + return (false); + + /* Bump the oldest ID, we're about to do some visibility checks. */ + WT_IGNORE_RET(__wt_txn_update_oldest(session, 0)); + /* * Allow some leeway if the transaction ID isn't moving forward since * it is unlikely eviction will be able to evict the page. Don't keep * skipping the page indefinitely or large records can lead to * extremely large memory footprints. */ - if (page->memory_footprint < btree->maxmempage && + if (page->modify->update_restored && page->modify->last_eviction_id == __wt_txn_oldest_id(session)) return (false); - if (page->memory_footprint < btree->maxmempage) - return (__wt_leaf_page_can_split(session, page)); - /* Trigger eviction on the next page release. */ __wt_page_evict_soon(session, ref); - /* Bump the oldest ID, we're about to do some visibility checks. */ - WT_IGNORE_RET(__wt_txn_update_oldest(session, 0)); - /* If eviction cannot succeed, don't try. */ return (__wt_page_can_evict(session, ref, NULL)); } |