Change signature of rebalanceTeams
This commit is contained in:
parent
14c5c78f8f
commit
a04ca65ad5
|
@ -1396,12 +1396,12 @@ ACTOR Future<Void> dataDistributionRelocator(DDQueueData* self, RelocateData rd,
|
|||
}
|
||||
|
||||
// Move a random shard of sourceTeam's to destTeam if sourceTeam has much more data than destTeam
|
||||
ACTOR Future<bool> rebalanceTeams(DDQueueData* self,
|
||||
int priority,
|
||||
Reference<IDataDistributionTeam> sourceTeam,
|
||||
Reference<IDataDistributionTeam> destTeam,
|
||||
bool primary,
|
||||
TraceEvent* traceEvent) {
|
||||
ACTOR static Future<bool> rebalanceTeams(DDQueueData* self,
|
||||
int priority,
|
||||
Reference<IDataDistributionTeam> sourceTeam,
|
||||
int64_t destBytes,
|
||||
bool primary,
|
||||
TraceEvent* traceEvent) {
|
||||
if (g_network->isSimulated() && g_simulator.speedUpSimulation) {
|
||||
traceEvent->detail("CancelingDueToSimulationSpeedup", true);
|
||||
return false;
|
||||
|
@ -1437,7 +1437,6 @@ ACTOR Future<bool> rebalanceTeams(DDQueueData* self,
|
|||
}
|
||||
|
||||
int64_t sourceBytes = sourceTeam->getLoadBytes(false);
|
||||
int64_t destBytes = destTeam->getLoadBytes();
|
||||
|
||||
bool sourceAndDestTooSimilar =
|
||||
sourceBytes - destBytes <= 3 * std::max<int64_t>(SERVER_KNOBS->MIN_SHARD_BYTES, metrics.bytes);
|
||||
|
@ -1530,7 +1529,7 @@ ACTOR Future<Void> BgDDMountainChopper(DDQueueData* self, int teamCollectionInde
|
|||
bool _moved = wait(rebalanceTeams(self,
|
||||
SERVER_KNOBS->PRIORITY_REBALANCE_OVERUTILIZED_TEAM,
|
||||
loadedTeam.first.get(),
|
||||
randomTeam.first.get(),
|
||||
randomTeam.first.get()->getLoadBytes(),
|
||||
teamCollectionIndex == 0,
|
||||
&traceEvent));
|
||||
moved = _moved;
|
||||
|
@ -1636,7 +1635,7 @@ ACTOR Future<Void> BgDDValleyFiller(DDQueueData* self, int teamCollectionIndex)
|
|||
bool _moved = wait(rebalanceTeams(self,
|
||||
SERVER_KNOBS->PRIORITY_REBALANCE_UNDERUTILIZED_TEAM,
|
||||
randomTeam.first.get(),
|
||||
unloadedTeam.first.get(),
|
||||
unloadedTeam.first.get()->getLoadBytes(),
|
||||
teamCollectionIndex == 0,
|
||||
&traceEvent));
|
||||
moved = _moved;
|
||||
|
|
Loading…
Reference in New Issue