From 83ad96254fdf16765376fe8581ae2de426e89aeb Mon Sep 17 00:00:00 2001 From: lhy1024 Date: Fri, 20 Oct 2023 11:53:29 +0800 Subject: [PATCH] checker: add disconnected check when fix orphan peers Signed-off-by: lhy1024 --- pkg/schedule/checker/rule_checker.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/schedule/checker/rule_checker.go b/pkg/schedule/checker/rule_checker.go index 34492a99ec08..8998a3af1755 100644 --- a/pkg/schedule/checker/rule_checker.go +++ b/pkg/schedule/checker/rule_checker.go @@ -459,6 +459,12 @@ loopFits: hasUnhealthyFit = true break loopFits } + // avoid to meet down store when fix orpahn peers, + // Isdisconnected is more strictly than IsUnhealthy. + if c.cluster.GetStore(p.GetStoreId()).IsDisconnected() { + hasUnhealthyFit = true + break loopFits + } } }