wiping also for non-prefixed db

This commit is contained in:
NikVolf 2016-07-13 19:51:03 +02:00
parent 9a0a5b4c22
commit 9fd95e6694

View File

@ -181,8 +181,10 @@ impl Database {
opts.set_write_buffer_size(cache_size * 1024 * 256); opts.set_write_buffer_size(cache_size * 1024 * 256);
} }
} else if let Some(cache_size) = config.cache_size { } else if let Some(cache_size) = config.cache_size {
let mut block_opts = BlockBasedOptions::new();
// half goes to read cache // half goes to read cache
opts.set_block_cache_size_mb(cache_size as u64 / 2); block_opts.set_cache(Cache::new(cache_size * 1024 * 256));
opts.set_block_based_table_factory(&block_opts);
// quarter goes to each of the two write buffers // quarter goes to each of the two write buffers
opts.set_write_buffer_size(cache_size * 1024 * 256); opts.set_write_buffer_size(cache_size * 1024 * 256);
} }