Merge pull request #305 from Standard-Cognition/set_db_write_buffer_size

Add set_db_write_buffer_size to the Options API
master
Jordan Terrell 6 years ago committed by GitHub
commit bf17f0ad1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 25
      src/db_options.rs

@ -673,6 +673,31 @@ impl Options {
}
}
/// Amount of data to build up in memtables across all column
/// families before writing to disk.
///
/// This is distinct from write_buffer_size, which enforces a limit
/// for a single memtable.
///
/// This feature is disabled by default. Specify a non-zero value
/// to enable it.
///
/// Default: 0 (disabled)
///
/// # Example
///
/// ```
/// use rocksdb::Options;
///
/// let mut opts = Options::default();
/// opts.set_db_write_buffer_size(128 * 1024 * 1024);
/// ```
pub fn set_db_write_buffer_size(&mut self, size: usize) {
unsafe {
ffi::rocksdb_options_set_db_write_buffer_size(self.inner, size);
}
}
/// Control maximum total data size for a level.
/// max_bytes_for_level_base is the max total for level-1.
/// Maximum number of bytes for level L can be calculated as

Loading…
Cancel
Save