diff --git a/server/schedulers/hot_region.go b/server/schedulers/hot_region.go index e11c67f6406..e63f39fcb00 100644 --- a/server/schedulers/hot_region.go +++ b/server/schedulers/hot_region.go @@ -269,10 +269,12 @@ func summaryStoresLoad( hotPeers = append(hotPeers, peer.Clone()) } // Use sum of hot peers to estimate leader-only byte rate. - // For write requests, Write{Bytes, Keys} is applied to all Peers at the same time, while the Leader and Follower are under different loads (usually the Leader consumes more CPU). - // But none of the current dimension reflect this difference, so we create a new dimension to reflect it. + // For write requests, Write{Bytes, Keys} is applied to all Peers at the same time, + // while the Leader and Follower are under different loads (usually the Leader consumes more CPU). + // Write{QPS} does not require such processing. if kind == core.LeaderKind && rwTy == write { - loads = peerLoadSum + loads[statistics.ByteDim] = peerLoadSum[statistics.ByteDim] + loads[statistics.KeyDim] = peerLoadSum[statistics.KeyDim] } // Metric for debug.