From ccbf4c471c73354f32cd245549ea9262184a58ad Mon Sep 17 00:00:00 2001 From: Song Gao Date: Tue, 16 Mar 2021 19:45:55 +0800 Subject: [PATCH] address the comment Signed-off-by: Song Gao --- server/schedulers/hot_region.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/server/schedulers/hot_region.go b/server/schedulers/hot_region.go index 6a6541dc77c..a797de4f8ad 100644 --- a/server/schedulers/hot_region.go +++ b/server/schedulers/hot_region.go @@ -754,12 +754,8 @@ func (bs *balanceSolver) filterDstStores() map[uint64]*storeLoadDetail { filters = append(filters, leaderFilter) } - regionStores := make(map[uint64]*core.StoreInfo, 0) for _, store := range bs.cluster.GetFollowerStores(bs.cur.region) { - regionStores[store.GetID()] = store - } - for storeID := range bs.stLoadDetail { - if store, ok := regionStores[storeID]; ok { + if _, ok := bs.stLoadDetail[store.GetID()]; ok { candidates = append(candidates, store) } }