Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/kvstore/RocksEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,7 @@ nebula::cpp2::ErrorCode RocksEngine::compact() {
rocksdb::CompactRangeOptions options;
options.change_level = FLAGS_rocksdb_compact_change_level;
options.target_level = FLAGS_rocksdb_compact_target_level;
options.exclusive_manual_compaction = FLAGS_rocksdb_compact_exclusive_manual_compaction;
rocksdb::Status status = db_->CompactRange(options, nullptr, nullptr);
if (status.ok()) {
return nebula::cpp2::ErrorCode::SUCCEEDED;
Expand Down
5 changes: 5 additions & 0 deletions src/kvstore/RocksEngineConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ DEFINE_int32(rocksdb_compact_target_level,
"compacted files will be moved to the minimum level capable of "
"holding the data.");

DEFINE_bool(rocksdb_compact_exclusive_manual_compaction,
true,
"If true, no other compaction will run when manual compaction is running. "
"If false, automatic compactions can run concurrently with manual compaction.");

DEFINE_string(rocksdb_table_format,
"BlockBasedTable",
"SST file format of rocksdb, only support BlockBasedTable and PlainTable");
Expand Down
1 change: 1 addition & 0 deletions src/kvstore/RocksEngineConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ DECLARE_bool(enable_rocksdb_whole_key_filtering);
// rocksdb compact RangeOptions
DECLARE_bool(rocksdb_compact_change_level);
DECLARE_int32(rocksdb_compact_target_level);
DECLARE_bool(rocksdb_compact_exclusive_manual_compaction);

DECLARE_string(rocksdb_wal_dir);
DECLARE_string(rocksdb_backup_dir);
Expand Down