diff --git a/librocksdb-sys/rocksdb b/librocksdb-sys/rocksdb index 50f206ad8..48bfca38f 160000 --- a/librocksdb-sys/rocksdb +++ b/librocksdb-sys/rocksdb @@ -1 +1 @@ -Subproject commit 50f206ad84fa6cd516bad1bea93c03ae0655b314 +Subproject commit 48bfca38f6f175435052a59791922a1a453d9609 diff --git a/librocksdb-sys/rocksdb_lib_sources.txt b/librocksdb-sys/rocksdb_lib_sources.txt index 716b03d17..bf06ae24d 100644 --- a/librocksdb-sys/rocksdb_lib_sources.txt +++ b/librocksdb-sys/rocksdb_lib_sources.txt @@ -20,7 +20,6 @@ db/compaction/compaction_picker.cc db/compaction/compaction_picker_fifo.cc db/compaction/compaction_picker_level.cc db/compaction/compaction_picker_universal.cc -db/compaction/sst_partitioner.cc db/convenience.cc db/db_filesnapshot.cc db/db_impl/db_impl.cc @@ -77,7 +76,6 @@ env/env_hdfs.cc env/env_posix.cc env/file_system.cc env/fs_posix.cc -env/file_system_tracer.cc env/io_posix.cc env/mock_env.cc file/delete_scheduler.cc @@ -166,7 +164,6 @@ table/plain/plain_table_factory.cc table/plain/plain_table_index.cc table/plain/plain_table_key_coding.cc table/plain/plain_table_reader.cc -table/sst_file_dumper.cc table/sst_file_reader.cc table/sst_file_writer.cc table/table_properties.cc @@ -177,7 +174,6 @@ test_util/transaction_test_util.cc tools/dump/db_dump_tool.cc trace_replay/trace_replay.cc trace_replay/block_cache_tracer.cc -trace_replay/io_tracer.cc util/build_version.cc util/coding.cc util/compaction_job_stats_impl.cc @@ -212,8 +208,6 @@ utilities/convenience/info_log_finder.cc utilities/debug.cc utilities/env_mirror.cc utilities/env_timed.cc -utilities/fault_injection_env.cc -utilities/fault_injection_fs.cc utilities/leveldb_options/leveldb_options.cc utilities/memory/memory_util.cc utilities/merge_operators/max.cc @@ -250,4 +244,4 @@ utilities/transactions/write_unprepared_txn.cc utilities/transactions/write_unprepared_txn_db.cc utilities/ttl/db_ttl_impl.cc utilities/write_batch_with_index/write_batch_with_index.cc -utilities/write_batch_with_index/write_batch_with_index_internal.cc +utilities/write_batch_with_index/write_batch_with_index_internal.cc \ No newline at end of file diff --git a/src/compaction_filter.rs b/src/compaction_filter.rs index 3e82730c7..65d72e7d9 100644 --- a/src/compaction_filter.rs +++ b/src/compaction_filter.rs @@ -137,7 +137,7 @@ where Change(newval) => { *new_value = newval.as_ptr() as *mut c_char; *new_value_length = newval.len() as size_t; - *value_changed = 1_u8; + *value_changed = 1 as c_uchar; 0 } } diff --git a/src/db_options.rs b/src/db_options.rs index 40d177158..b4545ee95 100644 --- a/src/db_options.rs +++ b/src/db_options.rs @@ -137,22 +137,6 @@ impl Env { } } - /// Sets the size of the low priority thread pool that can be used to - /// prevent compactions from stalling memtable flushes. - pub fn set_low_priority_background_threads(&mut self, n: c_int) { - unsafe { - ffi::rocksdb_env_set_low_priority_background_threads(self.inner, n); - } - } - - /// Sets the size of the bottom priority thread pool that can be used to - /// prevent compactions from stalling memtable flushes. - pub fn set_bottom_priority_background_threads(&mut self, n: c_int) { - unsafe { - ffi::rocksdb_env_set_bottom_priority_background_threads(self.inner, n); - } - } - /// Wait for all threads started by StartThread to terminate. pub fn join_all_threads(&mut self) { unsafe { @@ -2239,24 +2223,6 @@ impl Options { } } - /// If not zero, dump rocksdb.stats to RocksDB to LOG every `stats_persist_period_sec`. - /// - /// Default: `600` (10 mins) - /// - /// # Examples - /// - /// ``` - /// use rocksdb::Options; - /// - /// let mut opts = Options::default(); - /// opts.set_stats_persist_period_sec(5); - /// ``` - pub fn set_stats_persist_period_sec(&mut self, period: c_uint) { - unsafe { - ffi::rocksdb_options_set_stats_persist_period_sec(self.inner, period); - } - } - /// When set to true, reading SST files will opt out of the filesystem's /// readahead. Setting this to false may improve sequential iteration /// performance. @@ -3454,15 +3420,4 @@ mod tests { branching_factor: 4, }); } - - #[test] - fn test_set_stats_persist_period_sec() { - let mut opts = Options::default(); - opts.enable_statistics(); - opts.set_stats_persist_period_sec(5); - assert!(opts.get_statistics().is_some()); - - let opts = Options::default(); - assert!(opts.get_statistics().is_none()); - } } diff --git a/tests/test_db.rs b/tests/test_db.rs index d9ec85b24..eed57dc87 100644 --- a/tests/test_db.rs +++ b/tests/test_db.rs @@ -779,29 +779,6 @@ fn get_with_cache_and_bulkload_test() { opts.set_error_if_exists(true); assert!(DB::open(&opts, &path).is_err()); } - - // disable all threads - { - // create new options - let mut opts = Options::default(); - opts.set_max_background_jobs(0); - opts.set_stats_dump_period_sec(0); - opts.set_stats_persist_period_sec(0); - - // test Env::Default()->SetBackgroundThreads(0, Env::Priority::BOTTOM); - let mut env = Env::default().unwrap(); - env.set_bottom_priority_background_threads(0); - opts.set_env(&env); - - // open db - let db = DB::open(&opts, &path).unwrap(); - - // try to get key - let iter = db.iterator(IteratorMode::Start); - for (expected, (k, _)) in iter.enumerate() { - assert_eq!(k.as_ref(), format!("{:0>4}", expected).as_bytes()); - } - } } #[test]