diff --git a/server/schedule/checker/replica_checker.go b/server/schedule/checker/replica_checker.go index 2c7be4387de5..174c099be3e7 100644 --- a/server/schedule/checker/replica_checker.go +++ b/server/schedule/checker/replica_checker.go @@ -107,13 +107,10 @@ func (r *ReplicaChecker) checkDownPeer(region *core.RegionInfo) *operator.Operat log.Warn("lost the store, maybe you are recovering the PD cluster", zap.Uint64("store-id", storeID)) return nil } + // Only consider the state of the Store, not `stats.DownSeconds`. if store.DownTime() < r.opts.GetMaxStoreDownTime() { continue } - if stats.GetDownSeconds() < uint64(r.opts.GetMaxStoreDownTime().Seconds()) { - continue - } - return r.fixPeer(region, storeID, downStatus) } return nil diff --git a/server/schedule/checker/rule_checker.go b/server/schedule/checker/rule_checker.go index abbe5adc6269..887c2210e95a 100644 --- a/server/schedule/checker/rule_checker.go +++ b/server/schedule/checker/rule_checker.go @@ -320,12 +320,10 @@ func (c *RuleChecker) isDownPeer(region *core.RegionInfo, peer *metapb.Peer) boo log.Warn("lost the store, maybe you are recovering the PD cluster", zap.Uint64("store-id", storeID)) return false } + // Only consider the state of the Store, not `stats.DownSeconds`. if store.DownTime() < c.cluster.GetOpts().GetMaxStoreDownTime() { continue } - if stats.GetDownSeconds() < uint64(c.cluster.GetOpts().GetMaxStoreDownTime().Seconds()) { - continue - } return true } return false