fdbserver/ClusterController.actor.cpp
// Returns true iff
// - role is master, or
// - role is a singleton AND worker's pid is being used for any non-singleton role
Returns true iff
role is master, or
role is a singleton AND worker's pid is being used for any non-singleton role
Returns true iff role is master or role is a singleton AND worker ' s pid is being used for any non - singleton role
bool onMasterIsBetter(const WorkerDetails& worker, ProcessClass::ClusterRole role) const {
		ASSERT(masterProcessId.present());
		const auto& pid = worker.interf.locality.processId();
		if ((role != ProcessClass::DataDistributor && role != ProcessClass::Ratekeeper &&
		     role != ProcessClass::BlobManager) ||
		    pid == masterProcessId.get()) {
			return false;
		}
		return isUsedNotMaster(pid);
	}
bool onMasterIsBetter ( const WorkerDetails & worker , ProcessClass :: ClusterRole role ) const { ASSERT ( masterProcessId . present ( ) ) ; const auto & pid = worker . interf . locality . processId ( ) ; if ( ( role != ProcessClass :: DataDistributor && role != ProcessClass :: Ratekeeper && role != ProcessClass :: BlobManager ) || pid == masterProcessId . get ( ) ) { return false ; } return isUsedNotMaster ( pid ) ; }
Returns true iff
 role is master, or
 role is a singleton AND worker's pid is being used for any non-singleton role
Returns true iff role is master or role is a singleton AND worker ' s pid is being used for any non - singleton role