Lower bound version of CC_DEGRADED_PEER_DEGREE_TO_EXCLUDE (#11840)
This commit is contained in:
parent
a14a0d0fda
commit
c2862b8728
|
|
@ -799,6 +799,7 @@ void ServerKnobs::initialize(Randomize randomize, ClientKnobs* clientKnobs, IsSi
|
|||
init( CC_MIN_DEGRADATION_INTERVAL, 120.0 );
|
||||
init( ENCRYPT_KEY_PROXY_FAILURE_TIME, 0.1 ); if ( isSimulated ) ENCRYPT_KEY_PROXY_FAILURE_TIME = 1.0 + deterministicRandom()->random01();
|
||||
init( CC_DEGRADED_PEER_DEGREE_TO_EXCLUDE, 3 );
|
||||
init( CC_DEGRADED_PEER_DEGREE_TO_EXCLUDE_MIN, 1 );
|
||||
init( CC_MAX_EXCLUSION_DUE_TO_HEALTH, 2 );
|
||||
init( CC_HEALTH_TRIGGER_RECOVERY, false, Atomic::NO );
|
||||
init( CC_TRACKING_HEALTH_RECOVERY_INTERVAL, 3600.0 );
|
||||
|
|
|
|||
|
|
@ -766,6 +766,8 @@ public:
|
|||
int CC_DEGRADED_PEER_DEGREE_TO_EXCLUDE; // The maximum number of degraded peers when excluding a server. When the
|
||||
// number of degraded peers is more than this value, we will not exclude
|
||||
// this server since it may because of server overload.
|
||||
int CC_DEGRADED_PEER_DEGREE_TO_EXCLUDE_MIN; // Similar to CC_DEGRADED_PEER_DEGREE_TO_EXCLUDE which is an upper
|
||||
// bound, this is a lower bound.
|
||||
int CC_MAX_EXCLUSION_DUE_TO_HEALTH; // The max number of degraded servers to exclude by Cluster Controller due to
|
||||
// degraded health.
|
||||
bool CC_HEALTH_TRIGGER_RECOVERY; // If true, cluster controller will kill the master to trigger recovery when
|
||||
|
|
|
|||
|
|
@ -3208,7 +3208,8 @@ public:
|
|||
// For degraded server that are complained by more than SERVER_KNOBS->CC_DEGRADED_PEER_DEGREE_TO_EXCLUDE, we
|
||||
// don't know if it is a hot server, or the network is bad. We remove from the returned degraded server list.
|
||||
for (const auto& badServer : currentDegradedServers) {
|
||||
if (degradedLinkDst2Src[badServer].size() <= SERVER_KNOBS->CC_DEGRADED_PEER_DEGREE_TO_EXCLUDE) {
|
||||
if (degradedLinkDst2Src[badServer].size() >= SERVER_KNOBS->CC_DEGRADED_PEER_DEGREE_TO_EXCLUDE_MIN &&
|
||||
degradedLinkDst2Src[badServer].size() <= SERVER_KNOBS->CC_DEGRADED_PEER_DEGREE_TO_EXCLUDE) {
|
||||
currentDegradationInfo.degradedServers.insert(badServer);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ peer_latency_degradation_threshold = 1
|
|||
peer_latency_degradation_percentile = 0.5
|
||||
peer_latency_check_min_population = 10
|
||||
cc_max_exclusion_due_to_health = 3
|
||||
cc_degraded_peer_degree_to_exclude_min = 2
|
||||
|
||||
[[test]]
|
||||
testTitle = "ClogRemoteTLog"
|
||||
|
|
|
|||
Loading…
Reference in New Issue