find the "workFactor" for this, were it launched now
| 401 | |
| 402 | // find the "workFactor" for this, were it launched now |
| 403 | int getSrcWorkFactor(RelocateData const& relocation, int singleRegionTeamSize) { |
| 404 | if (relocation.healthPriority == SERVER_KNOBS->PRIORITY_TEAM_1_LEFT || |
| 405 | relocation.healthPriority == SERVER_KNOBS->PRIORITY_TEAM_0_LEFT) |
| 406 | return WORK_FULL_UTILIZATION / SERVER_KNOBS->RELOCATION_PARALLELISM_PER_SOURCE_SERVER; |
| 407 | else if (relocation.healthPriority == SERVER_KNOBS->PRIORITY_TEAM_2_LEFT) |
| 408 | return WORK_FULL_UTILIZATION / 2 / SERVER_KNOBS->RELOCATION_PARALLELISM_PER_SOURCE_SERVER; |
| 409 | else // for now we assume that any message at a lower priority can best be assumed to have a full team left for work |
| 410 | return WORK_FULL_UTILIZATION / singleRegionTeamSize / SERVER_KNOBS->RELOCATION_PARALLELISM_PER_SOURCE_SERVER; |
| 411 | } |
| 412 | |
| 413 | int getDestWorkFactor() { |
| 414 | // Work of moving a shard is even across destination servers |
no outgoing calls
no test coverage detected