Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
Signed-off-by: bufferflies <[email protected]>
  • Loading branch information
bufferflies committed Aug 16, 2023
1 parent e77d70a commit 6ff1e36
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/schedule/scatter/region_scatterer.go
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ func (r *RegionScatterer) scatterRegion(region *core.RegionInfo, group string, s
}
filters[filterLen-2] = filter.NewExcludedFilter(r.name, nil, selectedStores)
filters[filterLen-1] = filter.NewPlacementSafeguard(r.name, r.cluster.GetSharedConfig(), r.cluster.GetBasicCluster(), r.cluster.GetRuleManager(), region, sourceStore, oldFit)
newPeer := r.selectCandidates(context, group, peer, filters)
newPeer := r.selectNewPeer(context, group, peer, filters)
targetPeers[newPeer.GetStoreId()] = newPeer
selectedStores[newPeer.GetStoreId()] = struct{}{}
// If the selected peer is a peer other than origin peer in this region,
Expand Down Expand Up @@ -426,7 +426,7 @@ func isSameDistribution(region *core.RegionInfo, targetPeers map[uint64]*metapb.
return region.GetLeader().GetStoreId() == targetLeader
}

func (r *RegionScatterer) selectCandidates(context engineContext, group string, peer *metapb.Peer, filters []filter.Filter) *metapb.Peer {
func (r *RegionScatterer) selectNewPeer(context engineContext, group string, peer *metapb.Peer, filters []filter.Filter) *metapb.Peer {
stores := r.cluster.GetStores()
maxStoreTotalCount := uint64(0)
minStoreTotalCount := uint64(math.MaxUint64)
Expand Down

0 comments on commit 6ff1e36

Please sign in to comment.