Move stepSize knob from ClientKnobs to ServerKnobs

This commit is contained in:
Jefferson Zhong 2023-06-07 21:26:35 -07:00
parent ac30b3c84f
commit 13853c9f89
5 changed files with 7 additions and 6 deletions

View File

@ -183,7 +183,6 @@ void ClientKnobs::initialize(Randomize randomize) {
init( RESTORE_DISPATCH_ADDTASK_SIZE, 150 );
init( RESTORE_DISPATCH_BATCH_SIZE, 30000 ); if( randomize && BUGGIFY ) RESTORE_DISPATCH_BATCH_SIZE = 20;
init( RESTORE_WRITE_TX_SIZE, 256 * 1024 );
init( RESTORE_LOAD_KEY_VERSION_MAP_STEP_SIZE, 10000);
init( APPLY_MAX_LOCK_BYTES, 1e9 );
init( APPLY_MIN_LOCK_BYTES, 11e6 ); //Must be bigger than TRANSACTION_SIZE_LIMIT
init( APPLY_BLOCK_SIZE, LOG_RANGE_BLOCK_SIZE/5 );

View File

@ -1165,15 +1165,17 @@ void ServerKnobs::initialize(Randomize randomize, ClientKnobs* clientKnobs, IsSi
init( BLOB_MIGRATOR_ERROR_RETRIES, 20 );
init( BLOB_MIGRATOR_PREPARE_TIMEOUT, 120.0 );
init( BLOB_RESTORE_MANIFEST_FILE_MAX_SIZE, isSimulated ? 10000 : 10000000 );
init( BLOB_RESTORE_MANIFEST_RETENTION_MAX, 10 );
init( BLOB_RESTORE_MANIFEST_RETENTION_MAX, 10 );
init( BLOB_RESTORE_MLOGS_RETENTION_SECS, isSimulated ? 180 : 3600 * 24 * 14 );
init( BLOB_GRANULES_FLUSH_BATCH_SIZE, isSimulated ? 2 : 64 );
init( BLOB_RESTORE_LOAD_KEY_VERSION_MAP_STEP_SIZE, 10000 );
init( BLOB_GRANULES_FLUSH_BATCH_SIZE, isSimulated ? 2 : 64 );
init( BGCC_TIMEOUT, isSimulated ? 10.0 : 120.0 );
init( BGCC_MIN_INTERVAL, isSimulated ? 1.0 : 10.0 );
// Blob Metadata
init( BLOB_METADATA_CACHE_TTL, isSimulated ? 120 : 24 * 60 * 60 );
init( BLOB_METADATA_CACHE_TTL, isSimulated ? 120 : 24 * 60 * 60 );
if ( randomize && BUGGIFY) { BLOB_METADATA_CACHE_TTL = deterministicRandom()->randomInt(50, 100); }
// HTTP KMS Connector

View File

@ -183,7 +183,6 @@ public:
int RESTORE_DISPATCH_ADDTASK_SIZE;
int RESTORE_DISPATCH_BATCH_SIZE;
int RESTORE_WRITE_TX_SIZE;
int RESTORE_LOAD_KEY_VERSION_MAP_STEP_SIZE;
int APPLY_MAX_LOCK_BYTES;
int APPLY_MIN_LOCK_BYTES;
int APPLY_BLOCK_SIZE;

View File

@ -1180,6 +1180,7 @@ public:
int BLOB_RESTORE_MANIFEST_FILE_MAX_SIZE;
int BLOB_RESTORE_MANIFEST_RETENTION_MAX;
int BLOB_RESTORE_MLOGS_RETENTION_SECS;
int BLOB_RESTORE_LOAD_KEY_VERSION_MAP_STEP_SIZE;
int BLOB_GRANULES_FLUSH_BATCH_SIZE;
// Blob metadata

View File

@ -486,7 +486,7 @@ private:
// Update applyMutationsKeyVersionMap
state int i;
state int stepSize = CLIENT_KNOBS->RESTORE_LOAD_KEY_VERSION_MAP_STEP_SIZE;
state int stepSize = SERVER_KNOBS->BLOB_RESTORE_LOAD_KEY_VERSION_MAP_STEP_SIZE;
for (i = 0; i < self->mlogRestoreRanges_.size(); i += stepSize) {
int end = std::min(i + stepSize, self->mlogRestoreRanges_.size());
wait(preloadApplyMutationsKeyVersionMap(