diff --git a/fdbserver/DataDistributionQueue.actor.cpp b/fdbserver/DataDistributionQueue.actor.cpp index f89244c5b7..812b7aa0f1 100644 --- a/fdbserver/DataDistributionQueue.actor.cpp +++ b/fdbserver/DataDistributionQueue.actor.cpp @@ -1396,12 +1396,12 @@ ACTOR Future dataDistributionRelocator(DDQueueData* self, RelocateData rd, } // Move a random shard of sourceTeam's to destTeam if sourceTeam has much more data than destTeam -ACTOR Future rebalanceTeams(DDQueueData* self, - int priority, - Reference sourceTeam, - Reference destTeam, - bool primary, - TraceEvent* traceEvent) { +ACTOR static Future rebalanceTeams(DDQueueData* self, + int priority, + Reference 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 rebalanceTeams(DDQueueData* self, } int64_t sourceBytes = sourceTeam->getLoadBytes(false); - int64_t destBytes = destTeam->getLoadBytes(); bool sourceAndDestTooSimilar = sourceBytes - destBytes <= 3 * std::max(SERVER_KNOBS->MIN_SHARD_BYTES, metrics.bytes); @@ -1530,7 +1529,7 @@ ACTOR Future 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 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;