Skip to content

Commit

Permalink
use CC_ENABLE_WORKER_HEALTH_MONITOR knob to guard remoteDCIsHealthy l…
Browse files Browse the repository at this point in the history
…ogic
  • Loading branch information
halfprice authored and jzhou77 committed Dec 6, 2021
1 parent dbbc4a3 commit 1a9bec0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions fdbserver/ClusterController.actor.cpp
Expand Up @@ -1895,6 +1895,11 @@ class ClusterControllerData {

// Returns true if remote DC is healthy and can failover to.
bool remoteDCIsHealthy() {
// Ignore remote DC health if worker health monitor is disabled.
if (!SERVER_KNOBS->CC_ENABLE_WORKER_HEALTH_MONITOR) {
return true;
}

// When we just start, we ignore any remote DC health info since the current CC may be elected at wrong DC due
// to that all the processes are still starting.
if (machineStartTime() == 0) {
Expand Down

0 comments on commit 1a9bec0

Please sign in to comment.