Skip to content

Commit

Permalink
This is an automated cherry-pick of tikv#4078
Browse files Browse the repository at this point in the history
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
  • Loading branch information
HunDunDM authored and ti-chi-bot committed Sep 6, 2021
1 parent f94e000 commit 9ee1fbc
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
8 changes: 8 additions & 0 deletions server/schedule/checker/replica_checker.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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
}
Expand Down
7 changes: 7 additions & 0 deletions server/schedule/checker/rule_checker.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9ee1fbc

Please sign in to comment.