summaryrefslogtreecommitdiff
path: root/src/async
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2014-09-10 17:46:19 -0400
committerKeith Bostic <keith@wiredtiger.com>2014-09-10 17:46:19 -0400
commit8582cd5db8ae729deef7aa8e67cdfdb29f08c848 (patch)
treea40ce76594be1586c59e3d4fec9223f48d7f71fb /src/async
parent90d6d4173aa1957e3b4d633c5691f7853c2701a8 (diff)
downloadmongo-8582cd5db8ae729deef7aa8e67cdfdb29f08c848.tar.gz
Merging the wiredtiger_open configuration means we should never see
not-found returned when retrieving the async.enabled, async.ops_max and async.threads configurations.
Diffstat (limited to 'src/async')
-rw-r--r--src/async/async_api.c26
1 files changed, 9 insertions, 17 deletions
diff --git a/src/async/async_api.c b/src/async/async_api.c
index 294662defab..e7c2c101bb1 100644
--- a/src/async/async_api.c
+++ b/src/async/async_api.c
@@ -172,32 +172,24 @@ __async_config(WT_SESSION_IMPL *session,
WT_CONNECTION_IMPL *conn, const char **cfg, int *runp)
{
WT_CONFIG_ITEM cval;
- WT_DECL_RET;
/*
* The async configuration is off by default.
*/
- if ((ret = __wt_config_gets(
- session, cfg, "async.enabled", &cval)) == 0)
- *runp = cval.val != 0;
- WT_RET_NOTFOUND_OK(ret);
+ WT_RET(__wt_config_gets(session, cfg, "async.enabled", &cval));
+ *runp = cval.val != 0;
/*
* Even if async is turned off, we want to parse and store the
* default values so that reconfigure can just enable them.
*/
- if ((ret = __wt_config_gets(
- session, cfg, "async.ops_max", &cval)) == 0)
- conn->async_size = (uint32_t)cval.val;
- WT_RET_NOTFOUND_OK(ret);
-
- if ((ret = __wt_config_gets(
- session, cfg, "async.threads", &cval)) == 0) {
- conn->async_workers = (uint32_t)cval.val;
- /* Sanity check that api_data.py is in sync with async.h */
- WT_ASSERT(session, conn->async_workers <= WT_ASYNC_MAX_WORKERS);
- }
- WT_RET_NOTFOUND_OK(ret);
+ WT_RET(__wt_config_gets(session, cfg, "async.ops_max", &cval));
+ conn->async_size = (uint32_t)cval.val;
+
+ WT_RET(__wt_config_gets(session, cfg, "async.threads", &cval));
+ conn->async_workers = (uint32_t)cval.val;
+ /* Sanity check that api_data.py is in sync with async.h */
+ WT_ASSERT(session, conn->async_workers <= WT_ASYNC_MAX_WORKERS);
return (0);
}