Add migration timeout

This commit is contained in:
Lukas Joswiak 2022-07-08 13:38:50 -07:00
parent c32f3f8746
commit 56dfdbda83
3 changed files with 3 additions and 3 deletions

View File

@ -482,6 +482,7 @@ void ServerKnobs::initialize(Randomize randomize, ClientKnobs* clientKnobs, IsSi
init( RESET_MASTER_DELAY, 300.0 );
init( RESET_RESOLVER_DELAY, 300.0 );
init( GLOBAL_CONFIG_MIGRATE_TIMEOUT, 1.0 );
init( GLOBAL_CONFIG_MAX_REFRESH_BATCH_INTERVAL, 1.0 ); if ( randomize && BUGGIFY ) GLOBAL_CONFIG_MAX_REFRESH_BATCH_INTERVAL = 0.1;
// Master Server

View File

@ -399,6 +399,7 @@ public:
double RESET_MASTER_DELAY;
double RESET_RESOLVER_DELAY;
double GLOBAL_CONFIG_MIGRATE_TIMEOUT;
double GLOBAL_CONFIG_MAX_REFRESH_BATCH_INTERVAL;
// Master Server

View File

@ -347,8 +347,6 @@ ACTOR Future<Void> globalConfigMigrate(GrvProxyData* grvProxyData) {
} catch (Error& e) {
// Multiple GRV proxies may attempt this migration at the same
// time, sometimes resulting in aborts due to conflicts.
// Purposefully avoid retrying, making this migration
// best-effort.
TraceEvent(SevInfo, "GlobalConfigRetryableMigrationError").errorUnsuppressed(e).suppressFor(1.0);
wait(tr->onError(e));
}
@ -411,7 +409,7 @@ ACTOR Future<Void> globalConfigRequestServer(GrvProxyData* grvProxyData, GrvProx
actors.add(globalConfigRefreshBatcher(grvProxyData, grvProxy, batchedRequests));
// Run one-time migration supporting upgrades.
wait(success(globalConfigMigrate(grvProxyData)));
wait(success(timeout(globalConfigMigrate(grvProxyData), SERVER_KNOBS->GLOBAL_CONFIG_MIGRATE_TIMEOUT)));
loop {
choose {