diff options
author | Keith Bostic <keith@wiredtiger.com> | 2015-03-03 09:38:59 -0500 |
---|---|---|
committer | Keith Bostic <keith@wiredtiger.com> | 2015-03-03 09:38:59 -0500 |
commit | d970bfe6b1bed7d1919b800bf2d65a3789b74d6f (patch) | |
tree | 362ae3c1f0c0eb84ae6771ac8d6dd58e5384f04d /src/conn/conn_cache.c | |
parent | a1a397aadb6f210da340b8cad5fd637b9d4968a5 (diff) | |
download | mongo-d970bfe6b1bed7d1919b800bf2d65a3789b74d6f.tar.gz |
Don't set eviction_workers_min/eviction_workers_max in the connection
structure before checking the values are OK.
Diffstat (limited to 'src/conn/conn_cache.c')
-rw-r--r-- | src/conn/conn_cache.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/conn/conn_cache.c b/src/conn/conn_cache.c index 241d60098f3..ba95f4cf275 100644 --- a/src/conn/conn_cache.c +++ b/src/conn/conn_cache.c @@ -18,6 +18,7 @@ __cache_config_local(WT_SESSION_IMPL *session, int shared, const char *cfg[]) WT_CACHE *cache; WT_CONFIG_ITEM cval; WT_CONNECTION_IMPL *conn; + uint32_t evict_workers_max, evict_workers_min; conn = S2C(session); cache = conn->cache; @@ -51,16 +52,18 @@ __cache_config_local(WT_SESSION_IMPL *session, int shared, const char *cfg[]) */ WT_RET(__wt_config_gets(session, cfg, "eviction.threads_max", &cval)); WT_ASSERT(session, cval.val > 0); - conn->evict_workers_max = (u_int)cval.val - 1; + evict_workers_max = (u_int)cval.val - 1; WT_RET(__wt_config_gets(session, cfg, "eviction.threads_min", &cval)); WT_ASSERT(session, cval.val > 0); - conn->evict_workers_min = (u_int)cval.val - 1; + evict_workers_min = (u_int)cval.val - 1; - if (conn->evict_workers_min > conn->evict_workers_max) + if (evict_workers_min > evict_workers_max) WT_RET_MSG(session, EINVAL, "eviction=(threads_min) cannot be greater than " "eviction=(threads_max)"); + conn->evict_workers_max = evict_workers_max; + conn->evict_workers_min = evict_workers_min; return (0); } |