add knob
This commit is contained in:
parent
3602ec80fb
commit
7b713f7fd2
|
@ -210,6 +210,7 @@ void ServerKnobs::initialize(Randomize _randomize, ClientKnobs* clientKnobs, IsS
|
||||||
init( ALL_DATA_REMOVED_DELAY, 1.0 );
|
init( ALL_DATA_REMOVED_DELAY, 1.0 );
|
||||||
init( INITIAL_FAILURE_REACTION_DELAY, 30.0 ); if( randomize && BUGGIFY ) INITIAL_FAILURE_REACTION_DELAY = 0.0;
|
init( INITIAL_FAILURE_REACTION_DELAY, 30.0 ); if( randomize && BUGGIFY ) INITIAL_FAILURE_REACTION_DELAY = 0.0;
|
||||||
init( CHECK_TEAM_DELAY, 30.0 );
|
init( CHECK_TEAM_DELAY, 30.0 );
|
||||||
|
init( PERPETUAL_WIGGLE_DELAY, 50.0 );
|
||||||
init( LOG_ON_COMPLETION_DELAY, DD_QUEUE_LOGGING_INTERVAL );
|
init( LOG_ON_COMPLETION_DELAY, DD_QUEUE_LOGGING_INTERVAL );
|
||||||
init( BEST_TEAM_MAX_TEAM_TRIES, 10 );
|
init( BEST_TEAM_MAX_TEAM_TRIES, 10 );
|
||||||
init( BEST_TEAM_OPTION_COUNT, 4 );
|
init( BEST_TEAM_OPTION_COUNT, 4 );
|
||||||
|
|
|
@ -160,6 +160,7 @@ public:
|
||||||
double ALL_DATA_REMOVED_DELAY;
|
double ALL_DATA_REMOVED_DELAY;
|
||||||
double INITIAL_FAILURE_REACTION_DELAY;
|
double INITIAL_FAILURE_REACTION_DELAY;
|
||||||
double CHECK_TEAM_DELAY;
|
double CHECK_TEAM_DELAY;
|
||||||
|
double PERPETUAL_WIGGLE_DELAY;
|
||||||
double LOG_ON_COMPLETION_DELAY;
|
double LOG_ON_COMPLETION_DELAY;
|
||||||
int BEST_TEAM_MAX_TEAM_TRIES;
|
int BEST_TEAM_MAX_TEAM_TRIES;
|
||||||
int BEST_TEAM_OPTION_COUNT;
|
int BEST_TEAM_OPTION_COUNT;
|
||||||
|
|
|
@ -3936,14 +3936,17 @@ ACTOR Future<Void> updateNextWigglingStoragePID(DDTeamCollection* teamCollection
|
||||||
ACTOR Future<Void> perpetualStorageWiggleIterator(AsyncVar<bool>* stopSignal,
|
ACTOR Future<Void> perpetualStorageWiggleIterator(AsyncVar<bool>* stopSignal,
|
||||||
FutureStream<Void> finishStorageWiggleSignal,
|
FutureStream<Void> finishStorageWiggleSignal,
|
||||||
DDTeamCollection* teamCollection) {
|
DDTeamCollection* teamCollection) {
|
||||||
|
state int lastFinishTime = now();
|
||||||
loop {
|
loop {
|
||||||
choose {
|
choose {
|
||||||
when(wait(stopSignal->onChange())) {}
|
when(wait(stopSignal->onChange())) {}
|
||||||
when(waitNext(finishStorageWiggleSignal)) {
|
when(waitNext(finishStorageWiggleSignal)) {
|
||||||
|
state bool takeRest = true; // delay to avoid delete and update ServerList too frequently
|
||||||
|
while (takeRest) {
|
||||||
|
wait(delayJittered(SERVER_KNOBS->PERPETUAL_WIGGLE_DELAY));
|
||||||
// there must not have other teams to place wiggled data
|
// there must not have other teams to place wiggled data
|
||||||
while (teamCollection->server_info.size() <= teamCollection->configuration.storageTeamSize ||
|
takeRest = teamCollection->server_info.size() <= teamCollection->configuration.storageTeamSize ||
|
||||||
teamCollection->machine_info.size() < teamCollection->configuration.storageTeamSize) {
|
teamCollection->machine_info.size() < teamCollection->configuration.storageTeamSize;
|
||||||
wait(delayJittered(SERVER_KNOBS->CHECK_TEAM_DELAY));
|
|
||||||
}
|
}
|
||||||
wait(updateNextWigglingStoragePID(teamCollection));
|
wait(updateNextWigglingStoragePID(teamCollection));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue