Skip to content

Commit

Permalink
Update server/schedule/opt/healthy.go
Browse files Browse the repository at this point in the history
Co-authored-by: 混沌DM <hundundm@gmail.com>
  • Loading branch information
rleungx and HunDunDM authored Jan 19, 2021
1 parent 8a44024 commit e513b6f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions server/schedule/opt/healthy.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ func IsHealthyAllowPending(cluster Cluster, region *core.RegionInfo) bool {

// IsEmptyRegionAllowBalance checks if a region is an empty region and can be balanced.
func IsEmptyRegionAllowBalance(cluster Cluster, region *core.RegionInfo) bool {
return region.GetApproximateSize() > core.EmptyRegionApproximateSize ||
(region.GetApproximateSize() <= core.EmptyRegionApproximateSize && cluster.GetRegionCount() < balanceEmptyRegionThreshold)
return region.GetApproximateSize() > core.EmptyRegionApproximateSize || cluster.GetRegionCount() < balanceEmptyRegionThreshold
}

// HealthRegion returns a function that checks if a region is healthy for
Expand Down

0 comments on commit e513b6f

Please sign in to comment.