Add delete_obsolete_files_period_micros to RocksDB options. (#7908)
This commit is contained in:
parent
9a6387af70
commit
9c20a07d35
|
@ -410,6 +410,7 @@ void ServerKnobs::initialize(Randomize randomize, ClientKnobs* clientKnobs, IsSi
|
|||
init( ROCKSDB_WRITE_BUFFER_SIZE, 1 << 30 ); // 1G
|
||||
init( ROCKSDB_MAX_TOTAL_WAL_SIZE, 0 ); // RocksDB default.
|
||||
init( ROCKSDB_MAX_BACKGROUND_JOBS, 2 ); // RocksDB default.
|
||||
init( ROCKSDB_DELETE_OBSOLETE_FILE_PERIOD, 21600 ); // 6h, RocksDB default.
|
||||
|
||||
// Leader election
|
||||
bool longLeaderElection = randomize && BUGGIFY;
|
||||
|
|
|
@ -337,6 +337,7 @@ public:
|
|||
int64_t ROCKSDB_WRITE_BUFFER_SIZE;
|
||||
int64_t ROCKSDB_MAX_TOTAL_WAL_SIZE;
|
||||
int64_t ROCKSDB_MAX_BACKGROUND_JOBS;
|
||||
int64_t ROCKSDB_DELETE_OBSOLETE_FILE_PERIOD;
|
||||
|
||||
// Leader election
|
||||
int MAX_NOTIFICATIONS;
|
||||
|
|
|
@ -301,6 +301,7 @@ rocksdb::Options getOptions() {
|
|||
options.IncreaseParallelism(SERVER_KNOBS->ROCKSDB_BACKGROUND_PARALLELISM);
|
||||
}
|
||||
|
||||
options.delete_obsolete_files_period_micros = SERVER_KNOBS->ROCKSDB_DELETE_OBSOLETE_FILE_PERIOD * 1000000;
|
||||
options.max_total_wal_size = SERVER_KNOBS->ROCKSDB_MAX_TOTAL_WAL_SIZE;
|
||||
options.max_subcompactions = SERVER_KNOBS->ROCKSDB_MAX_SUBCOMPACTIONS;
|
||||
options.max_background_jobs = SERVER_KNOBS->ROCKSDB_MAX_BACKGROUND_JOBS;
|
||||
|
|
Loading…
Reference in New Issue