Merge pull request #181 from ekmartin/memtable_bloom

Add set_memtable_prefix_bloom_ratio
master
Tyler Neely 6 years ago committed by GitHub
commit b2419d48df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 18
      src/db_options.rs

@ -1043,6 +1043,24 @@ impl Options {
}
}
/// When a `prefix_extractor` is defined through `opts.set_prefix_extractor` this creates a
/// prefix bloom filter for each memtable with the size of
/// `write_buffer_size * memtable_prefix_bloom_ratio` (capped at 0.25).
///
/// Default: `0`
/// use rocksdb::{Options, SliceTransform};
///
/// let mut opts = Options::default();
/// let transform = SliceTransform::create_fixed_prefix(10);
/// opts.set_prefix_extractor(transform);
/// opts.set_memtable_prefix_bloom_ratio(0.2);
/// ```
pub fn set_memtable_prefix_bloom_ratio(&mut self, ratio: f64) {
unsafe {
ffi::rocksdb_options_set_memtable_prefix_bloom_size_ratio(self.inner, ratio);
}
}
/// Specifies the absolute path of the directory the
/// write-ahead log (WAL) should be written to.
///

Loading…
Cancel
Save