Knobs to speed up DB open. (#10301)
This commit is contained in:
parent
9bc55f67c3
commit
bbf15be05f
|
@ -527,6 +527,8 @@ void ServerKnobs::initialize(Randomize randomize, ClientKnobs* clientKnobs, IsSi
|
|||
init (ROCKSDB_CF_METRICS_DELAY, 900.0 );
|
||||
init (ROCKSDB_MAX_LOG_FILE_SIZE, 10485760 ); // 10MB.
|
||||
init (ROCKSDB_KEEP_LOG_FILE_NUM, 200 ); // Keeps 2GB log per storage server.
|
||||
init (ROCKSDB_SKIP_STATS_UPDATE_ON_OPEN, false ); if (isSimulated) ROCKSDB_SKIP_STATS_UPDATE_ON_OPEN = deterministicRandom()->coinflip();
|
||||
init (ROCKSDB_SKIP_FILE_SIZE_CHECK_ON_OPEN, false ); if (isSimulated) ROCKSDB_SKIP_FILE_SIZE_CHECK_ON_OPEN = deterministicRandom()->coinflip();
|
||||
|
||||
// Leader election
|
||||
bool longLeaderElection = randomize && BUGGIFY;
|
||||
|
|
|
@ -470,6 +470,8 @@ public:
|
|||
double ROCKSDB_CF_METRICS_DELAY;
|
||||
int ROCKSDB_MAX_LOG_FILE_SIZE;
|
||||
int ROCKSDB_KEEP_LOG_FILE_NUM;
|
||||
bool ROCKSDB_SKIP_STATS_UPDATE_ON_OPEN;
|
||||
bool ROCKSDB_SKIP_FILE_SIZE_CHECK_ON_OPEN;
|
||||
|
||||
// Leader election
|
||||
int MAX_NOTIFICATIONS;
|
||||
|
|
|
@ -477,6 +477,9 @@ rocksdb::Options getOptions() {
|
|||
}
|
||||
options.max_log_file_size = SERVER_KNOBS->ROCKSDB_MAX_LOG_FILE_SIZE;
|
||||
options.keep_log_file_num = SERVER_KNOBS->ROCKSDB_KEEP_LOG_FILE_NUM;
|
||||
|
||||
options.skip_stats_update_on_db_open = SERVER_KNOBS->ROCKSDB_SKIP_STATS_UPDATE_ON_OPEN;
|
||||
options.skip_checking_sst_file_sizes_on_db_open = SERVER_KNOBS->ROCKSDB_SKIP_FILE_SIZE_CHECK_ON_OPEN;
|
||||
return options;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue