Skip to content

Commit

Permalink
Update server/schedule/opt/healthy.go
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Leung <rleungx@gmail.com>
  • Loading branch information
rleungx committed Jan 20, 2021
1 parent 8a44024 commit 5219763
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 5219763

Please sign in to comment.