diff options
author | Susan LoVerso <sue@mongodb.com> | 2016-03-16 13:55:18 -0400 |
---|---|---|
committer | Susan LoVerso <sue@mongodb.com> | 2016-03-16 13:55:18 -0400 |
commit | 72beb86483fc6e637952034bb12c8c672b47c8bc (patch) | |
tree | b413c08fa3609c1b197cdda03dc5da6232e3c151 | |
parent | aec48c2c0e65bf436aa5962caa78ac6b529879cb (diff) | |
download | mongo-72beb86483fc6e637952034bb12c8c672b47c8bc.tar.gz |
WT-2481 Set memory_page_max after we read chunk_max.
-rw-r--r-- | src/lsm/lsm_meta.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/lsm/lsm_meta.c b/src/lsm/lsm_meta.c index e57be0c6459..52a174f644c 100644 --- a/src/lsm/lsm_meta.c +++ b/src/lsm/lsm_meta.c @@ -191,22 +191,6 @@ __lsm_meta_read_v1( chunk = NULL; /* -Wconditional-uninitialized */ - /* - * Set up the config for each chunk. - * - * Make the memory_page_max double the chunk size, so application - * threads don't immediately try to force evict the chunk when the - * worker thread clears the NO_EVICTION flag. - */ - file_cfg[1] = lsmconf; - WT_ERR(__wt_scr_alloc(session, 0, &buf)); - WT_ERR(__wt_buf_fmt(session, buf, - "key_format=u,value_format=u,memory_page_max=%" PRIu64, - 2 * lsm_tree->chunk_max)); - file_cfg[2] = buf->data; - WT_ERR(__wt_config_collapse(session, file_cfg, &fileconf)); - lsm_tree->file_config = fileconf; - WT_ERR(__wt_config_getones(session, lsmconf, "key_format", &cv)); WT_ERR(__wt_strndup(session, cv.str, cv.len, &lsm_tree->key_format)); WT_ERR(__wt_config_getones(session, lsmconf, "value_format", &cv)); @@ -346,6 +330,22 @@ __lsm_meta_read_v1( lsm_tree->nold_chunks = nchunks; /* + * Set up the config for each chunk. + * + * Make the memory_page_max double the chunk size, so application + * threads don't immediately try to force evict the chunk when the + * worker thread clears the NO_EVICTION flag. + */ + file_cfg[1] = lsmconf; + WT_ERR(__wt_scr_alloc(session, 0, &buf)); + WT_ERR(__wt_buf_fmt(session, buf, + "key_format=u,value_format=u,memory_page_max=%" PRIu64, + 2 * lsm_tree->chunk_max)); + file_cfg[2] = buf->data; + WT_ERR(__wt_config_collapse(session, file_cfg, &fileconf)); + lsm_tree->file_config = fileconf; + + /* * Ignore any other values: the metadata entry might have been * created by a future release, with unknown options. */ |