Skip to content

Commit

Permalink
add more comments
Browse files Browse the repository at this point in the history
Signed-off-by: rleungx <rleungx@gmail.com>
  • Loading branch information
rleungx committed Jan 13, 2021
1 parent 0481cc7 commit 17aeec9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions server/schedulers/balance_region.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ const (
// balanceRegionRetryLimit is the limit to retry schedule for selected store.
balanceRegionRetryLimit = 10
// BalanceEmptyRegionThreshold is a threshold which allow balance the empty region if the region number is less than this threshold.
// It is mainly used to keep the same as the original whose regions are balanced when initializing a new cluster.
balanceEmptyRegionThreshold = 50
// BalanceRegionName is balance region scheduler name.
BalanceRegionName = "balance-region-scheduler"
Expand Down
1 change: 1 addition & 0 deletions server/schedulers/balance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -962,6 +962,7 @@ func (s *testBalanceRegionSchedulerSuite) TestEmptyRegion(c *C) {
operators := sb.Schedule(tc)
c.Assert(operators, NotNil)

// exceed balanceEmptyRegionThreshold
for i := uint64(10); i < 60; i++ {
tc.PutRegionStores(i, 1, 3, 4)
}
Expand Down

0 comments on commit 17aeec9

Please sign in to comment.