Commit 1f236012 authored by qupeng's avatar qupeng Committed by Yi Wu

add set_paranoid_checks (#296)

parent 74947e8e
......@@ -325,6 +325,7 @@ extern "C" {
pub fn crocksdb_options_create() -> *mut Options;
pub fn crocksdb_options_copy(opts: *const Options) -> *mut Options;
pub fn crocksdb_options_destroy(opts: *mut Options);
pub fn crocksdb_options_set_paranoid_checks(opts: *mut Options, _: u8);
pub fn crocksdb_column_family_descriptor_destroy(cf_desc: *mut ColumnFamilyDescriptor);
pub fn crocksdb_name_from_column_family_descriptor(
cf_descs: *const ColumnFamilyDescriptor,
......
......@@ -996,6 +996,14 @@ impl DBOptions {
);
}
}
/// Set paranoid checks. The default value is `true`. We can set it to `false`
/// to skip manifest checks.
pub fn set_paranoid_checks(&self, enable: bool) {
unsafe {
crocksdb_ffi::crocksdb_options_set_paranoid_checks(self.inner, enable as u8);
}
}
}
pub struct ColumnFamilyOptions {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment