fdbserver/ClusterController.actor.cpp
// Checks that if any worker or their degraded peers have recovered. If so, remove them from `workerHealth`.
Checks that if any worker or their degraded peers have recovered. If so, remove them from `workerHealth`.
Checks that if any worker or their degraded peers have recovered . If so remove them from ` workerHealth ` .
void updateRecoveredWorkers() {
		double currentTime = now();
		for (auto& [workerAddress, health] : workerHealth) {
			for (auto it = health.degradedPeers.begin(); it != health.degradedPeers.end();) {
				if (currentTime - it->second.lastRefreshTime > SERVER_KNOBS->CC_DEGRADED_LINK_EXPIRATION_INTERVAL) {
					TraceEvent("WorkerPeerHealthRecovered").detail("Worker", workerAddress).detail("Peer", it->first);
					health.degradedPeers.erase(it++);
				} else {
					++it;
				}
			}
		}
		for (auto it = workerHealth.begin(); it != workerHealth.end();) {
			if (it->second.degradedPeers.empty()) {
				TraceEvent("WorkerAllPeerHealthRecovered").detail("Worker", it->first);
				workerHealth.erase(it++);
			} else {
				++it;
			}
		}
	}
void updateRecoveredWorkers ( ) { double currentTime = now ( ) ; for ( auto & [ workerAddress , health ] : workerHealth ) { for ( auto it = health . degradedPeers . begin ( ) ; it != health . degradedPeers . end ( ) ; ) { if ( currentTime - it -> second . lastRefreshTime > SERVER_KNOBS -> CC_DEGRADED_LINK_EXPIRATION_INTERVAL ) { TraceEvent ( " " ) . detail ( " " , workerAddress ) . detail ( " " , it -> first ) ; health . degradedPeers . erase ( it ++ ) ; } else { ++ it ; } } } for ( auto it = workerHealth . begin ( ) ; it != workerHealth . end ( ) ; ) { if ( it -> second . degradedPeers . empty ( ) ) { TraceEvent ( " " ) . detail ( " " , it -> first ) ; workerHealth . erase ( it ++ ) ; } else { ++ it ; } } }
Checks that if any worker or their degraded peers have recovered.
Checks that if any worker or their degraded peers have recovered .