From c70a76139d9f98cd8f929ed6ff5b0e72b805a46a Mon Sep 17 00:00:00 2001 From: Roman Zeyde Date: Tue, 7 Aug 2018 15:05:53 +0300 Subject: [PATCH] Expose 'set_skip_stats_update_on_db_open' option --- src/db_options.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/db_options.rs b/src/db_options.rs index ba9bbad..c499c5a 100644 --- a/src/db_options.rs +++ b/src/db_options.rs @@ -1098,6 +1098,17 @@ impl Options { ffi::rocksdb_options_set_wal_dir(self.inner, p.as_ptr()); } } + + /// If true, then DB::Open() will not update the statistics used to optimize + /// compaction decision by loading table properties from many files. + /// Turning off this feature will improve DBOpen time especially in disk environment. + /// + /// Default: false + pub fn set_skip_stats_update_on_db_open(&mut self, skip: bool) { + unsafe { + ffi::rocksdb_options_set_skip_stats_update_on_db_open(self.inner, skip as c_uchar); + } + } } impl Default for Options {