fdbserver/ClusterController.actor.cpp
// Returns true if remote DC is healthy and can failover to.
Returns true if remote DC is healthy and can failover to.
Returns true if remote DC is healthy and can failover to .
bool remoteDCIsHealthy() {
		if (!SERVER_KNOBS->CC_ENABLE_WORKER_HEALTH_MONITOR) {
			return true;
		}
		if (machineStartTime() == 0) {
			return true;
		}
		if (now() - machineStartTime() < SERVER_KNOBS->INITIAL_UPDATE_CROSS_DC_INFO_DELAY) {
			return true;
		}
		if (!remoteDCMonitorStarted) {
			return false;
		}
		return !remoteTransactionSystemContainsDegradedServers();
	}
bool remoteDCIsHealthy ( ) { if ( ! SERVER_KNOBS -> CC_ENABLE_WORKER_HEALTH_MONITOR ) { return true ; } if ( machineStartTime ( ) == 0 ) { return true ; } if ( now ( ) - machineStartTime ( ) < SERVER_KNOBS -> INITIAL_UPDATE_CROSS_DC_INFO_DELAY ) { return true ; } if ( ! remoteDCMonitorStarted ) { return false ; } return ! remoteTransactionSystemContainsDegradedServers ( ) ; }
Returns true if remote DC is healthy and can failover to.
Returns true if remote DC is healthy and can failover to .
// Ignore remote DC health if worker health monitor is disabled. // 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. // When remote DC health is not monitored, we may not know whether the remote is healthy or not. So return false // here to prevent failover.