| 21 | #include "fdbserver/ShardsAffectedByTeamFailure.h" |
| 22 | |
| 23 | std::vector<KeyRange> ShardsAffectedByTeamFailure::getShardsFor(Team team) const { |
| 24 | std::vector<KeyRange> r; |
| 25 | for (auto it = team_shards.lower_bound(std::pair<Team, KeyRange>(team, KeyRangeRef())); |
| 26 | it != team_shards.end() && it->first == team; |
| 27 | ++it) |
| 28 | r.push_back(it->second); |
| 29 | return r; |
| 30 | } |
| 31 | |
| 32 | bool ShardsAffectedByTeamFailure::hasShards(Team team) const { |
| 33 | auto it = team_shards.lower_bound(std::pair<Team, KeyRange>(team, KeyRangeRef())); |
no test coverage detected