Skip to content

Commit

Permalink
fix usage
Browse files Browse the repository at this point in the history
Signed-off-by: HunDunDM <[email protected]>
  • Loading branch information
HunDunDM committed Jul 26, 2021
1 parent 0f8a97e commit c82c23f
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions server/schedulers/shuffle_hot_region.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,22 +132,20 @@ func (s *shuffleHotRegionScheduler) Schedule(cluster opt.Cluster) []*operator.Op
}

func (s *shuffleHotRegionScheduler) dispatch(typ rwType, cluster opt.Cluster) []*operator.Operator {
stores := cluster.GetStores()
storeInfos := summaryStoreInfos(cluster)
storesLoads := cluster.GetStoresLoads()
switch typ {
case read:
s.stLoadInfos[readLeader] = summaryStoresLoad(
stores,
storeInfos,
storesLoads,
map[uint64]*Influence{},
cluster.RegionReadStats(),
read, core.LeaderKind)
return s.randomSchedule(cluster, s.stLoadInfos[readLeader])
case write:
s.stLoadInfos[writeLeader] = summaryStoresLoad(
stores,
storeInfos,
storesLoads,
map[uint64]*Influence{},
cluster.RegionWriteStats(),
write, core.LeaderKind)
return s.randomSchedule(cluster, s.stLoadInfos[writeLeader])
Expand Down

0 comments on commit c82c23f

Please sign in to comment.