|
|
@ -418,6 +418,16 @@ impl Options { |
|
|
|
/// The manifest file is rolled over on reaching this limit.
|
|
|
|
/// The manifest file is rolled over on reaching this limit.
|
|
|
|
/// The older manifest file be deleted.
|
|
|
|
/// The older manifest file be deleted.
|
|
|
|
/// The default value is MAX_INT so that roll-over does not take place.
|
|
|
|
/// The default value is MAX_INT so that roll-over does not take place.
|
|
|
|
|
|
|
|
///
|
|
|
|
|
|
|
|
/// # Example
|
|
|
|
|
|
|
|
///
|
|
|
|
|
|
|
|
/// ```
|
|
|
|
|
|
|
|
/// use rocksdb::Options;
|
|
|
|
|
|
|
|
///
|
|
|
|
|
|
|
|
/// let mut opts = Options::default();
|
|
|
|
|
|
|
|
/// let size = 20 * 1024 * 1024;
|
|
|
|
|
|
|
|
/// opts.set_max_manifest_file_size(size);
|
|
|
|
|
|
|
|
/// ```
|
|
|
|
pub fn set_max_manifest_file_size(&mut self, size: usize) { |
|
|
|
pub fn set_max_manifest_file_size(&mut self, size: usize) { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
rocksdb_ffi::rocksdb_options_set_max_manifest_file_size(self.inner, size); |
|
|
|
rocksdb_ffi::rocksdb_options_set_max_manifest_file_size(self.inner, size); |
|
|
@ -681,13 +691,6 @@ impl Default for WriteOptions { |
|
|
|
mod tests { |
|
|
|
mod tests { |
|
|
|
use super::Options; |
|
|
|
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) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#[test] |
|
|
|
#[test] |
|
|
|
fn test_enable_statistics() { |
|
|
|
fn test_enable_statistics() { |
|
|
|
let mut opts = Options::default(); |
|
|
|
let mut opts = Options::default(); |
|
|
|