MCPcopy Create free account
hub / github.com/apple/foundationdb / string>> getExcludedLocalities

Method string>> getExcludedLocalities

fdbclient/ManagementAPI.actor.cpp:1701–1718  ·  view source on GitHub ↗

Get the current list of excluded localities by reading the keys.

Source from the content-addressed store, hash-verified

1699
1700// Get the current list of excluded localities by reading the keys.
1701ACTOR Future<std::vector<std::string>> getExcludedLocalities(Transaction* tr) {
1702 state RangeResult r = wait(tr->getRange(excludedLocalityKeys, CLIENT_KNOBS->TOO_MANY));
1703 ASSERT(!r.more && r.size() < CLIENT_KNOBS->TOO_MANY);
1704 state RangeResult r2 = wait(tr->getRange(failedLocalityKeys, CLIENT_KNOBS->TOO_MANY));
1705 ASSERT(!r2.more && r2.size() < CLIENT_KNOBS->TOO_MANY);
1706
1707 std::vector<std::string> excludedLocalities;
1708 for (const auto& i : r) {
1709 auto a = decodeExcludedLocalityKey(i.key);
1710 excludedLocalities.push_back(a);
1711 }
1712 for (const auto& i : r2) {
1713 auto a = decodeFailedLocalityKey(i.key);
1714 excludedLocalities.push_back(a);
1715 }
1716 uniquify(excludedLocalities);
1717 return excludedLocalities;
1718}
1719
1720// Get the list of excluded localities by reading the keys.
1721ACTOR Future<std::vector<std::string>> getExcludedLocalities(Database cx) {

Callers

nothing calls this directly

Calls 8

decodeFailedLocalityKeyFunction · 0.85
uniquifyFunction · 0.85
getRangeMethod · 0.65
setOptionMethod · 0.65
onErrorMethod · 0.65
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected