Get the current list of excluded localities by reading the keys.
| 1699 | |
| 1700 | // Get the current list of excluded localities by reading the keys. |
| 1701 | ACTOR 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. |
| 1721 | ACTOR Future<std::vector<std::string>> getExcludedLocalities(Database cx) { |
nothing calls this directly
no test coverage detected