MCPcopy Create free account
hub / github.com/apple/foundationdb / isMachineExcluded

Method isMachineExcluded

fdbclient/DatabaseConfiguration.cpp:756–767  ·  view source on GitHub ↗

checks if this machineid of given locality is excluded.

Source from the content-addressed store, hash-verified

754
755// checks if this machineid of given locality is excluded.
756bool DatabaseConfiguration::isMachineExcluded(const LocalityData& locality) const {
757 if (locality.machineId().present()) {
758 return get(encodeExcludedLocalityKey(LocalityData::ExcludeLocalityKeyMachineIdPrefix.toString() +
759 locality.machineId().get().toString()))
760 .present() ||
761 get(encodeFailedLocalityKey(LocalityData::ExcludeLocalityKeyMachineIdPrefix.toString() +
762 locality.machineId().get().toString()))
763 .present();
764 }
765
766 return false;
767}
768
769// Gets the list of already excluded localities (with failed option)
770std::set<std::string> DatabaseConfiguration::getExcludedLocalities() const {

Callers 1

machineStatusFetcherFunction · 0.80

Calls 7

encodeFailedLocalityKeyFunction · 0.85
machineIdMethod · 0.80
getFunction · 0.70
getMethod · 0.65
presentMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected