add set_max_manifest_file_size for Options

master
Dylan Wen 8 years ago committed by Karl Hobley
parent c884ee38b7
commit ad09a5fbe1
  1. 18
      src/rocksdb_options.rs

@ -270,6 +270,12 @@ impl Options {
} }
} }
pub fn set_max_manifest_file_size(&mut self, size: usize) {
unsafe {
rocksdb_ffi::rocksdb_options_set_max_manifest_file_size(self.inner, size);
}
}
pub fn set_target_file_size_base(&mut self, size: u64) { pub fn set_target_file_size_base(&mut self, size: u64) {
unsafe { unsafe {
rocksdb_ffi::rocksdb_options_set_target_file_size_base(self.inner, rocksdb_ffi::rocksdb_options_set_target_file_size_base(self.inner,
@ -406,3 +412,15 @@ impl Default for WriteOptions {
WriteOptions { inner: write_opts } WriteOptions { inner: write_opts }
} }
} }
#[cfg(test)]
mod tests {
use super::Options;
#[test]
fn test_set_max_manifest_file_size() {
let mut opts = Options::default();
let size = 20 * 1024 * 1024;
opts.set_max_manifest_file_size(size)
}
}

Loading…
Cancel
Save