fdbserver/ClusterController.actor.cpp
// Returns true iff processId is currently being used
// for any non-singleton role other than master
Returns true iff processId is currently being used
for any non-singleton role other than master
Returns true iff processId is currently being used for any non - singleton role other than master
bool isUsedNotMaster(Optional<Key> processId) const {
		ASSERT(masterProcessId.present());
		if (processId == masterProcessId)
			return false;
		auto& dbInfo = db.serverInfo->get();
		for (const auto& tlogset : dbInfo.logSystemConfig.tLogs) {
			for (const auto& tlog : tlogset.tLogs) {
				if (tlog.present() && tlog.interf().filteredLocality.processId() == processId)
					return true;
			}
		}
		for (const CommitProxyInterface& interf : dbInfo.client.commitProxies) {
			if (interf.processId == processId)
				return true;
		}
		for (const GrvProxyInterface& interf : dbInfo.client.grvProxies) {
			if (interf.processId == processId)
				return true;
		}
		for (const ResolverInterface& interf : dbInfo.resolvers) {
			if (interf.locality.processId() == processId)
				return true;
		}
		if (processId == clusterControllerProcessId)
			return true;
		return false;
	}
bool isUsedNotMaster ( Optional < Key > processId ) const { ASSERT ( masterProcessId . present ( ) ) ; if ( processId == masterProcessId ) return false ; auto & dbInfo = db . serverInfo -> get ( ) ; for ( const auto & tlogset : dbInfo . logSystemConfig . tLogs ) { for ( const auto & tlog : tlogset . tLogs ) { if ( tlog . present ( ) && tlog . interf ( ) . filteredLocality . processId ( ) == processId ) return true ; } } for ( const CommitProxyInterface & interf : dbInfo . client . commitProxies ) { if ( interf . processId == processId ) return true ; } for ( const GrvProxyInterface & interf : dbInfo . client . grvProxies ) { if ( interf . processId == processId ) return true ; } for ( const ResolverInterface & interf : dbInfo . resolvers ) { if ( interf . locality . processId ( ) == processId ) return true ; } if ( processId == clusterControllerProcessId ) return true ; return false ; }
Returns true iff processId is currently being used
for any non-singleton role other than master
Returns true iff processId is currently being used for any non - singleton role other than master