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

Method resetLocalitySet

fdbserver/DDTeamCollection.actor.cpp:3562–3570  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3560}
3561
3562void DDTeamCollection::resetLocalitySet() {
3563 storageServerSet = Reference<LocalitySet>(new LocalityMap<UID>());
3564 LocalityMap<UID>* storageServerMap = (LocalityMap<UID>*)storageServerSet.getPtr();
3565
3566 for (auto& it : server_info) {
3567 it.second->localityEntry =
3568 storageServerMap->add(it.second->getLastKnownInterface().locality, &it.second->getId());
3569 }
3570}
3571
3572bool DDTeamCollection::satisfiesPolicy(const std::vector<Reference<TCServerInfo>>& team, int amount) const {
3573 std::vector<LocalityEntry> forcedEntries, resultEntries;

Callers 1

whenFunction · 0.80

Calls 3

getPtrMethod · 0.45
addMethod · 0.45
getIdMethod · 0.45

Tested by

no test coverage detected