diff options
author | Alex Gorrod <alexander.gorrod@mongodb.com> | 2016-10-07 15:28:01 +1100 |
---|---|---|
committer | Alex Gorrod <alexander.gorrod@mongodb.com> | 2016-10-07 15:28:01 +1100 |
commit | 6a31c2118cce88c68281eda2ca9ab1df915a2773 (patch) | |
tree | 21fb229070aa02ac8ad942254cfc516ece22a9d3 /src/conn/conn_cache.c | |
parent | fc0e7abe82595e579573d42448632f7b36a2d154 (diff) | |
parent | d6c7a001dded7b000a08d8675592f912ccdbab79 (diff) | |
download | mongodb-3.4.0-rc1.tar.gz |
Merge branch 'develop' into mongodb-3.4mongodb-3.4.0-rc1
Diffstat (limited to 'src/conn/conn_cache.c')
-rw-r--r-- | src/conn/conn_cache.c | 63 |
1 files changed, 27 insertions, 36 deletions
diff --git a/src/conn/conn_cache.c b/src/conn/conn_cache.c index 6788b1f7f47..1b8b3183d3c 100644 --- a/src/conn/conn_cache.c +++ b/src/conn/conn_cache.c @@ -42,47 +42,38 @@ __cache_config_local(WT_SESSION_IMPL *session, bool shared, const char *cfg[]) WT_RET(__wt_config_gets(session, cfg, "eviction_trigger", &cval)); cache->eviction_trigger = (u_int)cval.val; - if (F_ISSET(conn, WT_CONN_IN_MEMORY)) - cache->eviction_checkpoint_target = - cache->eviction_dirty_target = - cache->eviction_dirty_trigger = 100U; - else { - WT_RET(__wt_config_gets( - session, cfg, "eviction_checkpoint_target", &cval)); - cache->eviction_checkpoint_target = (u_int)cval.val; + WT_RET(__wt_config_gets( + session, cfg, "eviction_checkpoint_target", &cval)); + cache->eviction_checkpoint_target = (u_int)cval.val; - WT_RET(__wt_config_gets( - session, cfg, "eviction_dirty_target", &cval)); - cache->eviction_dirty_target = (u_int)cval.val; + WT_RET(__wt_config_gets(session, cfg, "eviction_dirty_target", &cval)); + 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; + /* + * 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. - */ - if (cache->eviction_checkpoint_target > 0 && - cache->eviction_checkpoint_target < - cache->eviction_dirty_target) - cache->eviction_checkpoint_target = - cache->eviction_dirty_target; + /* + * Sanity check the checkpoint target: don't allow a value + * lower than the dirty target. + */ + if (cache->eviction_checkpoint_target > 0 && + cache->eviction_checkpoint_target < cache->eviction_dirty_target) + cache->eviction_checkpoint_target = + cache->eviction_dirty_target; - WT_RET(__wt_config_gets( - session, cfg, "eviction_dirty_trigger", &cval)); - cache->eviction_dirty_trigger = (u_int)cval.val; + 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; - } + /* + * 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)); WT_ASSERT(session, cval.val > 0); |