summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@mongodb.com>2016-06-15 15:39:01 +1000
committerAlex Gorrod <alexander.gorrod@mongodb.com>2016-06-15 15:39:01 +1000
commitac14731a59aebcd32775a5c0e06d37a8c666ee30 (patch)
tree45e038de98716d50bb3c84e9a9260961eb79fd74
parent0d4c83daf7174788d2a83321c33a215a9bdfa89f (diff)
downloadmongo-ac14731a59aebcd32775a5c0e06d37a8c666ee30.tar.gz
WT-2702 Block operations when the cache is 100% full. (#2798)
-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 b6a3d114380..9508c866454 100644
--- a/src/evict/evict_lru.c
+++ b/src/evict/evict_lru.c
@@ -1706,8 +1706,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. */