diff --git a/pkg/schedule/checker/rule_checker.go b/pkg/schedule/checker/rule_checker.go index 08ef5f7b45c..553ece09e65 100644 --- a/pkg/schedule/checker/rule_checker.go +++ b/pkg/schedule/checker/rule_checker.go @@ -132,6 +132,11 @@ func (c *RuleChecker) CheckWithFit(region *core.RegionInfo, fit *placement.Regio return } + // the placement rule is disabled + if fit == nil { + return + } + // If the fit is calculated by FitRegion, which means we get a new fit result, thus we should // invalid the cache if it exists c.ruleManager.InvalidCache(region.GetID())