diff options
author | nehakhatri5 <30581300+nehakhatri5@users.noreply.github.com> | 2017-11-23 22:12:11 +1100 |
---|---|---|
committer | Michael Cahill <michael.cahill@mongodb.com> | 2017-11-23 22:12:11 +1100 |
commit | dbe8848669f0d959e95bd0959eb23e88ba995161 (patch) | |
tree | 575e892e90327bdca25a99836809b2f508ef19fe | |
parent | 1f5219ae1d34beb2f34a8e28f91dcdcfb6241963 (diff) | |
download | mongo-dbe8848669f0d959e95bd0959eb23e88ba995161.tar.gz |
WT-3761 Queue pages for urgent eviction on page release (#3803)
Queue the page for urgent eviction when application thread is not supposed to do it. This allows splitting pages to maintain the performance of write operations.
-rw-r--r-- | src/include/btree.i | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/include/btree.i b/src/include/btree.i index 35cb868ac26..dd80401cd18 100644 --- a/src/include/btree.i +++ b/src/include/btree.i @@ -1425,15 +1425,20 @@ __wt_page_release(WT_SESSION_IMPL *session, WT_REF *ref, uint32_t flags) * tree, then perform a general check if eviction will be possible. */ page = ref->page; - if (!WT_READGEN_EVICT_SOON(page->read_gen) || - LF_ISSET(WT_READ_NO_SPLIT) || - btree->evict_disabled > 0 || - !__wt_page_can_evict(session, ref, &inmem_split) || - (F_ISSET(session, WT_SESSION_NO_RECONCILE) && !inmem_split)) - return (__wt_hazard_clear(session, ref)); - - WT_RET_BUSY_OK(__wt_page_release_evict(session, ref)); - return (0); + if (WT_READGEN_EVICT_SOON(page->read_gen) && + btree->evict_disabled == 0 && + __wt_page_can_evict(session, ref, &inmem_split)) { + if (__wt_page_is_modified(page) && + (LF_ISSET(WT_READ_NO_SPLIT) || (!inmem_split && + F_ISSET(session, WT_SESSION_NO_RECONCILE)))) + __wt_page_evict_urgent(session, ref); + else { + WT_RET_BUSY_OK(__wt_page_release_evict(session, ref)); + return (0); + } + } + + return (__wt_hazard_clear(session, ref)); } /* |