MCPcopy Create free account
hub / github.com/apple/foundationdb / getSrcWorkFactor

Function getSrcWorkFactor

fdbserver/DataDistributionQueue.actor.cpp:403–411  ·  view source on GitHub ↗

find the "workFactor" for this, were it launched now

Source from the content-addressed store, hash-verified

401
402// find the "workFactor" for this, were it launched now
403int 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
413int getDestWorkFactor() {
414 // Work of moving a shard is even across destination servers

Callers 2

canLaunchSrcFunction · 0.85
launchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected