Unverified Commit c6b8dd16 authored by yiwu-arbug's avatar yiwu-arbug Committed by GitHub

Cherry-pick Titan changes to tikv-3.0 (#345)

Cherry-pick recent Titan changes included in https://github.com/pingcap/titan/pull/89Signed-off-by: 's avatarYi Wu <yiwu@pingcap.com>
parent a0eb4933
......@@ -5145,9 +5145,9 @@ void ctitandb_options_set_max_background_gc(ctitandb_options_t* options,
options->rep.max_background_gc = size;
}
void ctitandb_options_set_purge_obsolete_files_period(ctitandb_options_t* options,
unsigned int period) {
options->rep.purge_obsolete_files_period = period;
void ctitandb_options_set_purge_obsolete_files_period_sec(
ctitandb_options_t* options, unsigned int period) {
options->rep.purge_obsolete_files_period_sec = period;
}
void ctitandb_options_set_blob_cache(ctitandb_options_t* options,
......
......@@ -2051,7 +2051,8 @@ ctitandb_options_set_merge_small_file_threshold(ctitandb_options_t* options,
extern C_ROCKSDB_LIBRARY_API void ctitandb_options_set_max_background_gc(
ctitandb_options_t* options, int32_t size);
extern C_ROCKSDB_LIBRARY_API void ctitandb_options_set_purge_obsolete_files_period(
extern C_ROCKSDB_LIBRARY_API void
ctitandb_options_set_purge_obsolete_files_period_sec(
ctitandb_options_t* options, unsigned int period);
extern C_ROCKSDB_LIBRARY_API void ctitandb_options_set_blob_cache(
......
Subproject commit 19ea115af9866a465a90b902f504dcf4ccf09d1f
Subproject commit ab0743ce31a7ada30cf785c6761374788811aedd
......@@ -1883,7 +1883,7 @@ extern "C" {
pub fn ctitandb_options_set_disable_background_gc(opts: *mut DBTitanDBOptions, disable: bool);
pub fn ctitandb_options_set_max_background_gc(opts: *mut DBTitanDBOptions, size: i32);
pub fn ctitandb_options_set_purge_obsolete_files_period(
pub fn ctitandb_options_set_purge_obsolete_files_period_sec(
opts: *mut DBTitanDBOptions,
period: usize,
);
......
......@@ -72,7 +72,7 @@ impl TitanDBOptions {
pub fn set_purge_obsolete_files_period(&mut self, period: usize) {
unsafe {
crocksdb_ffi::ctitandb_options_set_purge_obsolete_files_period(self.inner, period);
crocksdb_ffi::ctitandb_options_set_purge_obsolete_files_period_sec(self.inner, period);
}
}
......
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