summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@mongodb.com>2016-06-15 15:39:01 +1000
committerMichael Cahill <michael.cahill@mongodb.com>2016-06-23 16:02:46 +1000
commit0f36f40c37084f424717ccf0e7c11bd759c134b6 (patch)
treed392890d4a61da7128903dfbeadb3064ba40bb79
parenta6a64e986b72676e95a588c5df82a7e5c517df13 (diff)
downloadmongo-0f36f40c37084f424717ccf0e7c11bd759c134b6.tar.gz
WT-2702 Block operations when the cache is 100% full. (#2798)
(cherry picked from commit ac14731a59aebcd32775a5c0e06d37a8c666ee30)
-rw-r--r--src/evict/evict_lru.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/evict/evict_lru.c b/src/evict/evict_lru.c
index be8cc1df956..6889a4eb3e7 100644
--- a/src/evict/evict_lru.c
+++ b/src/evict/evict_lru.c
@@ -1628,8 +1628,9 @@ __wt_cache_eviction_worker(WT_SESSION_IMPL *session, bool busy, u_int pct_full)
}
/* See if eviction is still needed. */
- if (!__wt_eviction_needed(session, NULL) ||
- cache->pages_evict > init_evict_count + max_pages_evicted)
+ if (!__wt_eviction_needed(session, &pct_full) ||
+ (pct_full < 100 &&
+ cache->pages_evict > init_evict_count + max_pages_evicted))
return (0);
/* Evict a page. */