diff --git a/fdbclient/ServerKnobs.cpp b/fdbclient/ServerKnobs.cpp index 527db5819a..cc36cf3734 100644 --- a/fdbclient/ServerKnobs.cpp +++ b/fdbclient/ServerKnobs.cpp @@ -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; diff --git a/fdbclient/include/fdbclient/ServerKnobs.h b/fdbclient/include/fdbclient/ServerKnobs.h index 0e3f14970f..877c1a1ab0 100644 --- a/fdbclient/include/fdbclient/ServerKnobs.h +++ b/fdbclient/include/fdbclient/ServerKnobs.h @@ -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; diff --git a/fdbserver/KeyValueStoreShardedRocksDB.actor.cpp b/fdbserver/KeyValueStoreShardedRocksDB.actor.cpp index 3f476e0dca..549a9af64d 100644 --- a/fdbserver/KeyValueStoreShardedRocksDB.actor.cpp +++ b/fdbserver/KeyValueStoreShardedRocksDB.actor.cpp @@ -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; }