Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Leung <rleungx@gmail.com>
  • Loading branch information
rleungx committed Oct 25, 2023
1 parent c209d34 commit 7e28af7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkg/schedule/scatter/region_scatterer.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,11 @@ func (r *RegionScatterer) ScatterRegionsByID(regionsID []uint64, group string, r
return 0, nil, errEmptyRegion
}
if len(regionsID) == 1 {
scatterSkipNoRegionCounter.Inc()
return 0, nil, errRegionNotFound
region := r.cluster.GetRegion(regionsID[0])
if region == nil {
scatterSkipNoRegionCounter.Inc()
return 0, nil, errRegionNotFound
}
}
failures := make(map[uint64]error, len(regionsID))
regions := make([]*core.RegionInfo, 0, len(regionsID))
Expand Down

0 comments on commit 7e28af7

Please sign in to comment.