diff --git a/server/schedule/checker/replica_checker.go b/server/schedule/checker/replica_checker.go index 9a6a0e18e9d..412bd3c89bd 100644 --- a/server/schedule/checker/replica_checker.go +++ b/server/schedule/checker/replica_checker.go @@ -188,6 +188,7 @@ 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 } +<<<<<<< HEAD if store.DownTime() < r.cluster.GetMaxStoreDownTime() { continue } @@ -196,6 +197,13 @@ func (r *ReplicaChecker) checkDownPeer(region *core.RegionInfo) *operator.Operat } return r.fixPeer(region, peer, downStatus) +======= + // Only consider the state of the Store, not `stats.DownSeconds`. + if store.DownTime() < r.opts.GetMaxStoreDownTime() { + continue + } + return r.fixPeer(region, storeID, downStatus) +>>>>>>> 63abda935 (checker: judging that the peer is down is no longer based on DownSeconds (#4078)) } return nil } diff --git a/server/schedule/checker/rule_checker.go b/server/schedule/checker/rule_checker.go index 3329abdfa0a..13c4e5ef5c0 100644 --- a/server/schedule/checker/rule_checker.go +++ b/server/schedule/checker/rule_checker.go @@ -249,12 +249,19 @@ 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 } +<<<<<<< HEAD if store.DownTime() < c.cluster.GetMaxStoreDownTime() { continue } if stats.GetDownSeconds() < uint64(c.cluster.GetMaxStoreDownTime().Seconds()) { continue } +======= + // Only consider the state of the Store, not `stats.DownSeconds`. + if store.DownTime() < c.cluster.GetOpts().GetMaxStoreDownTime() { + continue + } +>>>>>>> 63abda935 (checker: judging that the peer is down is no longer based on DownSeconds (#4078)) return true } return false