Add COORDINATOR_LEADER_CONNECTION_TIMEOUT server knob
This commit is contained in:
parent
3c1cabf041
commit
d46feb5468
|
@ -652,6 +652,7 @@ void ServerKnobs::initialize(Randomize randomize, ClientKnobs* clientKnobs, IsSi
|
||||||
// Coordination
|
// Coordination
|
||||||
init( COORDINATED_STATE_ONCONFLICT_POLL_INTERVAL, 1.0 ); if( randomize && BUGGIFY ) COORDINATED_STATE_ONCONFLICT_POLL_INTERVAL = 10.0;
|
init( COORDINATED_STATE_ONCONFLICT_POLL_INTERVAL, 1.0 ); if( randomize && BUGGIFY ) COORDINATED_STATE_ONCONFLICT_POLL_INTERVAL = 10.0;
|
||||||
init( ENABLE_CROSS_CLUSTER_SUPPORT, true ); if( randomize && BUGGIFY ) ENABLE_CROSS_CLUSTER_SUPPORT = false;
|
init( ENABLE_CROSS_CLUSTER_SUPPORT, true ); if( randomize && BUGGIFY ) ENABLE_CROSS_CLUSTER_SUPPORT = false;
|
||||||
|
init( COORDINATOR_LEADER_CONNECTION_TIMEOUT, 20.0 );
|
||||||
|
|
||||||
// Buggification
|
// Buggification
|
||||||
init( BUGGIFIED_EVENTUAL_CONSISTENCY, 1.0 );
|
init( BUGGIFIED_EVENTUAL_CONSISTENCY, 1.0 );
|
||||||
|
|
|
@ -593,6 +593,7 @@ public:
|
||||||
double COORDINATED_STATE_ONCONFLICT_POLL_INTERVAL;
|
double COORDINATED_STATE_ONCONFLICT_POLL_INTERVAL;
|
||||||
bool ENABLE_CROSS_CLUSTER_SUPPORT; // Allow a coordinator to serve requests whose connection string does not match
|
bool ENABLE_CROSS_CLUSTER_SUPPORT; // Allow a coordinator to serve requests whose connection string does not match
|
||||||
// the local descriptor
|
// the local descriptor
|
||||||
|
double COORDINATOR_LEADER_CONNECTION_TIMEOUT;
|
||||||
|
|
||||||
// Buggification
|
// Buggification
|
||||||
double BUGGIFIED_EVENTUAL_CONSISTENCY;
|
double BUGGIFIED_EVENTUAL_CONSISTENCY;
|
||||||
|
|
|
@ -286,7 +286,7 @@ ACTOR Future<Void> leaderRegister(LeaderElectionRegInterface interf, Key key) {
|
||||||
state AsyncVar<Value> leaderInterface;
|
state AsyncVar<Value> leaderInterface;
|
||||||
state Reference<AsyncVar<Optional<LeaderInfo>>> currentElectedLeader =
|
state Reference<AsyncVar<Optional<LeaderInfo>>> currentElectedLeader =
|
||||||
makeReference<AsyncVar<Optional<LeaderInfo>>>();
|
makeReference<AsyncVar<Optional<LeaderInfo>>>();
|
||||||
state LivenessChecker canConnectToLeader(20.0);
|
state LivenessChecker canConnectToLeader(SERVER_KNOBS->COORDINATOR_LEADER_CONNECTION_TIMEOUT);
|
||||||
|
|
||||||
loop choose {
|
loop choose {
|
||||||
when(OpenDatabaseCoordRequest req = waitNext(interf.openDatabase.getFuture())) {
|
when(OpenDatabaseCoordRequest req = waitNext(interf.openDatabase.getFuture())) {
|
||||||
|
|
Loading…
Reference in New Issue