Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions kvdb-rocksdb/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,9 @@ fn generate_read_options() -> ReadOptions {
fn generate_block_based_options(config: &DatabaseConfig) -> BlockBasedOptions {
let mut block_opts = BlockBasedOptions::default();
block_opts.set_block_size(config.compaction.block_size);
// See https://github.com/facebook/rocksdb/blob/a1523efcdf2f0e8133b9a9f6e170a0dad49f928f/include/rocksdb/table.h#L246-L271 for details on what the format versions are/do.
block_opts.set_format_version(5);
block_opts.set_block_restart_interval(16);
// Set cache size as recommended by
// https://github.com/facebook/rocksdb/wiki/Setup-Options-and-Basic-Tuning#block-cache-size
let cache_size = config.memory_budget() / 3;
Expand Down Expand Up @@ -1106,7 +1109,7 @@ rocksdb.db.get.micros P50 : 2.000000 P95 : 3.000000 P99 : 4.000000 P100 : 5.0000
// Don't fsync every store
assert!(settings.contains("Options.use_fsync: 0"));

// We're using the old format
assert!(settings.contains("format_version: 2"));
// We're using the new format
assert!(settings.contains("format_version: 5"));
}
}