Merge pull request #187 from romanz/master

Expose compaction_readahead_size option
master
Tyler Neely 6 years ago committed by GitHub
commit 73460a0956
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 14
      src/db_options.rs

@ -228,6 +228,20 @@ impl Options {
}
}
/// If non-zero, we perform bigger reads when doing compaction. If you're
/// running RocksDB on spinning disks, you should set this to at least 2MB.
/// That way RocksDB's compaction is doing sequential instead of random reads.
///
/// When non-zero, we also force new_table_reader_for_compaction_inputs to
/// true.
///
/// Default: `0`
pub fn set_compaction_readahead_size(&mut self, compaction_readahead_size: usize) {
unsafe {
ffi::rocksdb_options_compaction_readahead_size(self.inner, compaction_readahead_size as usize);
}
}
pub fn set_merge_operator(&mut self, name: &str,
full_merge_fn: MergeFn,
partial_merge_fn: Option<MergeFn>) {

Loading…
Cancel
Save