candidateTeams is a vector containing one team per datacenter, the team(s) DD is planning on moving the shard to.
| 456 | |
| 457 | // candidateTeams is a vector containing one team per datacenter, the team(s) DD is planning on moving the shard to. |
| 458 | bool canLaunchDest(const std::vector<std::pair<Reference<IDataDistributionTeam>, bool>>& candidateTeams, |
| 459 | int priority, |
| 460 | std::map<UID, Busyness>& busymapDest) { |
| 461 | // fail switch if this is causing issues |
| 462 | if (SERVER_KNOBS->RELOCATION_PARALLELISM_PER_DEST_SERVER <= 0) { |
| 463 | return true; |
| 464 | } |
| 465 | int workFactor = getDestWorkFactor(); |
| 466 | for (auto& [team, _] : candidateTeams) { |
| 467 | for (UID id : team->getServerIDs()) { |
| 468 | if (!busymapDest[id].canLaunch(priority, workFactor)) { |
| 469 | return false; |
| 470 | } |
| 471 | } |
| 472 | } |
| 473 | return true; |
| 474 | } |
| 475 | |
| 476 | // update busyness for each server |
| 477 | void launch(RelocateData& relocation, std::map<UID, Busyness>& busymap, int singleRegionTeamSize) { |
no test coverage detected