Skip to content

Commit

Permalink
fix
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 16, 2024
1 parent 1bca504 commit da7d32c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/schedule/prepare_checker.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func (checker *prepareChecker) check(c *core.BasicCluster, collectWaitTime ...ti
}
storeID := store.GetID()
// It is used to avoid sudden scheduling when scheduling service is just started.
if len(collectWaitTime) > 0 && float64(store.GetRegionCount())*collectFactor > float64(c.GetNotFromStorageRegionsCntByStore(storeID)) {
if len(collectWaitTime) > 0 && (float64(store.GetStoreStats().GetRegionCount())*collectFactor > float64(c.GetNotFromStorageRegionsCntByStore(storeID))) {
return false

Check warning on line 65 in pkg/schedule/prepare_checker.go

View check run for this annotation

Codecov / codecov/patch

pkg/schedule/prepare_checker.go#L65

Added line #L65 was not covered by tests
}
// For each store, the number of active regions should be more than total region of the store * collectFactor
Expand Down

0 comments on commit da7d32c

Please sign in to comment.