fdbserver/ClusterController.actor.cpp
// Return best possible fitness for singleton. Note that lower fitness is better.
Return best possible fitness for singleton. Note that lower fitness is better.
Return best possible fitness for singleton . Note that lower fitness is better .
ProcessClass::Fitness findBestFitnessForSingleton(const ClusterControllerData* self,
                                                  const WorkerDetails& worker,
                                                  const ProcessClass::ClusterRole& role) {
	auto bestFitness = worker.processClass.machineClassFitness(role);
	if (self->db.config.isExcludedServer(worker.interf.addresses())) {
		bestFitness = std::max(bestFitness, ProcessClass::ExcludeFit);
	}
	return bestFitness;
}
ProcessClass :: Fitness findBestFitnessForSingleton ( const ClusterControllerData * self , const WorkerDetails & worker , const ProcessClass :: ClusterRole & role ) { auto bestFitness = worker . processClass . machineClassFitness ( role ) ; if ( self -> db . config . isExcludedServer ( worker . interf . addresses ( ) ) ) { bestFitness = std :: max ( bestFitness , ProcessClass :: ExcludeFit ) ; } return bestFitness ; }
Return best possible fitness for singleton.
Return best possible fitness for singleton .
// If the process has been marked as excluded, we take the max with ExcludeFit to ensure its fit // is at least as bad as ExcludeFit. This assists with successfully offboarding such processes // and removing them from the cluster.