From e2ea7a2c341426421cfa76abbc6c8fd6a8ecdc05 Mon Sep 17 00:00:00 2001 From: Zhe Wu Date: Fri, 3 Dec 2021 22:37:29 -0800 Subject: [PATCH] use CC_ENABLE_WORKER_HEALTH_MONITOR knob to guard remoteDCIsHealthy logic --- fdbserver/ClusterController.actor.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fdbserver/ClusterController.actor.cpp b/fdbserver/ClusterController.actor.cpp index f8c9bad538c..86121266f67 100644 --- a/fdbserver/ClusterController.actor.cpp +++ b/fdbserver/ClusterController.actor.cpp @@ -2861,6 +2861,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) {