Skip to content

Commit

Permalink
WT-2395 Use allocation_size from metadata.
Browse files Browse the repository at this point in the history
If we find a file that needs to be created, use its metadata config
in case it sets its own allocation size.
  • Loading branch information
sueloverso committed Feb 18, 2016
1 parent 5d3f10a commit 01e4018
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/meta/meta_turtle.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,9 @@ __metadata_load_bulk(WT_SESSION_IMPL *session)
WT_DECL_RET;
uint32_t allocsize;
bool exist;
const char *filecfg[] = { WT_CONFIG_BASE(session, file_meta), NULL };
const char *key;
const char *filecfg[] = {
WT_CONFIG_BASE(session, file_meta), NULL, NULL };
const char *key, *value;

/*
* If a file was being bulk-loaded during the hot backup, it will appear
Expand All @@ -135,6 +136,8 @@ __metadata_load_bulk(WT_SESSION_IMPL *session)
* If the file doesn't exist, assume it's a bulk-loaded file;
* retrieve the allocation size and re-create the file.
*/
WT_ERR(cursor->get_value(cursor, &value));
filecfg[1] = value;
WT_ERR(__wt_direct_io_size_check(
session, filecfg, "allocation_size", &allocsize));
WT_ERR(__wt_block_manager_create(session, key, allocsize));
Expand Down

0 comments on commit 01e4018

Please sign in to comment.