Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
fix column selection logic
Browse files Browse the repository at this point in the history
  • Loading branch information
rphmeier committed Sep 27, 2016
1 parent 8a344b0 commit c5092f7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions util/src/kvdb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,10 +247,7 @@ impl Database {
opts.set_target_file_size_base(config.compaction.initial_file_size);
opts.set_target_file_size_multiplier(config.compaction.file_size_multiplier);

let col_opt = match col {
0 => None,
x => Some(x - 1),
};
let col_opt = config.columns.map(|_| col);

{
let cache_size = config.cache_sizes.get(&col_opt).cloned().unwrap_or(DEFAULT_CACHE);
Expand All @@ -259,6 +256,7 @@ impl Database {
block_opts.set_cache(Cache::new(cache_size * 1024 * 1024));
opts.set_block_based_table_factory(&block_opts);
}

cf_options.push(opts);
}

Expand Down

0 comments on commit c5092f7

Please sign in to comment.