diff options
author | Keith Bostic <keith@wiredtiger.com> | 2015-11-16 08:30:09 -0500 |
---|---|---|
committer | Keith Bostic <keith@wiredtiger.com> | 2015-11-16 08:30:09 -0500 |
commit | f80db3583b81bfc737905019c3b502f423958ae6 (patch) | |
tree | 9d90f144853957214af4a5b86810cf68ec481826 /src/conn | |
parent | e3b090f21028b21aa4fb608a0adf4958b007c395 (diff) | |
download | mongo-f80db3583b81bfc737905019c3b502f423958ae6.tar.gz |
WT-2219: A non-zero idle time is incompatible with in-memory, and the
default is non-zero; set the idle time to zero in in-memory configurations.
Diffstat (limited to 'src/conn')
-rw-r--r-- | src/conn/conn_sweep.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/src/conn/conn_sweep.c b/src/conn/conn_sweep.c index a8620ebaa99..5c6e8cef4f8 100644 --- a/src/conn/conn_sweep.c +++ b/src/conn/conn_sweep.c @@ -329,18 +329,16 @@ __wt_sweep_config(WT_SESSION_IMPL *session, const char *cfg[]) conn = S2C(session); - /* Pull out the sweep configurations. */ - WT_RET(__wt_config_gets(session, - cfg, "file_manager.close_idle_time", &cval)); - conn->sweep_idle_time = (time_t)cval.val; - - /* Non-zero sweep idle time is incompatible with in-memory */ - if (conn->sweep_idle_time != 0) { - WT_RET(__wt_config_gets(session, cfg, "in_memory", &cval)); - if (cval.val != 0) - WT_RET_MSG(session, EINVAL, - "In memory configuration incompatible with " - "non zero file_manager=(close_idle_time)"); + /* + * A non-zero idle time is incompatible with in-memory, and the default + * is non-zero; set the idle time to zero in in-memory configurations. + */ + conn->sweep_idle_time = 0; + WT_RET(__wt_config_gets(session, cfg, "in_memory", &cval)); + if (cval.val == 0) { + WT_RET(__wt_config_gets(session, + cfg, "file_manager.close_idle_time", &cval)); + conn->sweep_idle_time = (time_t)cval.val; } WT_RET(__wt_config_gets(session, |