|
|
|
@ -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.
|
|
|
|
|
///
|
|
|
|
|