summaryrefslogtreecommitdiff
path: root/src/conn/conn_cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/conn/conn_cache.c')
-rw-r--r--src/conn/conn_cache.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/conn/conn_cache.c b/src/conn/conn_cache.c
index 7e94e9e87dc..6788b1f7f47 100644
--- a/src/conn/conn_cache.c
+++ b/src/conn/conn_cache.c
@@ -56,6 +56,13 @@ __cache_config_local(WT_SESSION_IMPL *session, bool shared, const char *cfg[])
cache->eviction_dirty_target = (u_int)cval.val;
/*
+ * Don't allow the dirty target to be larger than the overall
+ * target.
+ */
+ if (cache->eviction_dirty_target > cache->eviction_target)
+ cache->eviction_dirty_target = cache->eviction_target;
+
+ /*
* Sanity check the checkpoint target: don't allow a value
* lower than the dirty target.
*/
@@ -68,6 +75,13 @@ __cache_config_local(WT_SESSION_IMPL *session, bool shared, const char *cfg[])
WT_RET(__wt_config_gets(
session, cfg, "eviction_dirty_trigger", &cval));
cache->eviction_dirty_trigger = (u_int)cval.val;
+
+ /*
+ * Don't allow the dirty trigger to be larger than the overall
+ * trigger or we can get stuck with a cache full of dirty data.
+ */
+ if (cache->eviction_dirty_trigger > cache->eviction_trigger)
+ cache->eviction_dirty_trigger = cache->eviction_trigger;
}
WT_RET(__wt_config_gets(session, cfg, "eviction.threads_max", &cval));