diff --git a/client/Makefile b/client/Makefile index 93c7f247b367..d2ed116fa791 100644 --- a/client/Makefile +++ b/client/Makefile @@ -32,15 +32,10 @@ install-tools: static: install-tools @ gofmt -s -l -d . 2>&1 | awk '{ print } END { if (NR > 0) { exit 1 } }' -<<<<<<< HEAD - @ golangci-lint run -c ../.golangci.yml ./... - @ revive -formatter friendly -config ../revive.toml . -======= @ echo "golangci-lint ..." @ golangci-lint run -c ../.golangci.yml --verbose ./... --allow-parallel-runners @ echo "revive ..." @ revive -formatter friendly -config ../revive.toml ./... ->>>>>>> f916e90eb (rule_checker: can replace unhealthPeer with orphanPeer (#6831)) tidy: @ go mod tidy diff --git a/pkg/schedule/checker/rule_checker.go b/pkg/schedule/checker/rule_checker.go index 1291d629c332..7b516c782c39 100644 --- a/pkg/schedule/checker/rule_checker.go +++ b/pkg/schedule/checker/rule_checker.go @@ -540,15 +540,11 @@ func (c *RuleChecker) isDownPeer(region *core.RegionInfo, peer *metapb.Peer) boo func (c *RuleChecker) isStoreDownTimeHitMaxDownTime(storeID uint64) bool { store := c.cluster.GetStore(storeID) -<<<<<<< HEAD - return store.DownTime() >= c.cluster.GetOpts().GetMaxStoreDownTime() -======= if store == nil { log.Warn("lost the store, maybe you are recovering the PD cluster", zap.Uint64("store-id", storeID)) return false } - return store.DownTime() >= c.cluster.GetCheckerConfig().GetMaxStoreDownTime() ->>>>>>> f916e90eb (rule_checker: can replace unhealthPeer with orphanPeer (#6831)) + return store.DownTime() >= c.cluster.GetOpts().GetMaxStoreDownTime() } func (c *RuleChecker) isOfflinePeer(peer *metapb.Peer) bool { diff --git a/pkg/schedule/operator/create_operator.go b/pkg/schedule/operator/create_operator.go index c5633b87bd41..1538903e645b 100644 --- a/pkg/schedule/operator/create_operator.go +++ b/pkg/schedule/operator/create_operator.go @@ -51,7 +51,7 @@ func CreatePromoteLearnerOperator(desc string, ci ClusterInformer, region *core. } // CreatePromoteLearnerOperatorAndRemovePeer creates an operator that promotes a learner and removes a peer. -func CreatePromoteLearnerOperatorAndRemovePeer(desc string, ci sche.SharedCluster, region *core.RegionInfo, toPromote *metapb.Peer, toRemove *metapb.Peer) (*Operator, error) { +func CreatePromoteLearnerOperatorAndRemovePeer(desc string, ci ClusterInformer, region *core.RegionInfo, toPromote *metapb.Peer, toRemove *metapb.Peer) (*Operator, error) { return NewBuilder(desc, ci, region). PromoteLearner(toPromote.GetStoreId()). RemovePeer(toRemove.GetStoreId()). @@ -59,8 +59,8 @@ func CreatePromoteLearnerOperatorAndRemovePeer(desc string, ci sche.SharedCluste } // CreateDemoteLearnerOperatorAndRemovePeer creates an operator that demotes a learner and removes a peer. -func CreateDemoteLearnerOperatorAndRemovePeer(desc string, ci sche.SharedCluster, region *core.RegionInfo, toDemote *metapb.Peer, toRemove *metapb.Peer) (*Operator, error) { - if !ci.GetSharedConfig().IsUseJointConsensus() { +func CreateDemoteLearnerOperatorAndRemovePeer(desc string, ci ClusterInformer, region *core.RegionInfo, toDemote *metapb.Peer, toRemove *metapb.Peer) (*Operator, error) { + if !ci.GetOpts().IsUseJointConsensus() { return nil, errors.Errorf("cannot build demote learner operator due to disabling using joint state") } return NewBuilder(desc, ci, region). diff --git a/tests/integrations/mcs/Makefile b/tests/integrations/mcs/Makefile index 0458234aff6d..a446e0a4b61b 100644 --- a/tests/integrations/mcs/Makefile +++ b/tests/integrations/mcs/Makefile @@ -19,15 +19,10 @@ SHELL := env PATH='$(PATH)' GOBIN='$(GO_TOOLS_BIN_PATH)' $(shell which bash) static: install-tools @ gofmt -s -l -d . 2>&1 | awk '{ print } END { if (NR > 0) { exit 1 } }' -<<<<<<< HEAD - @ golangci-lint run ./... - @ revive -formatter friendly -config $(ROOT_PATH)/revive.toml . -======= @ echo "golangci-lint ..." @ golangci-lint run -c $(ROOT_PATH)/.golangci.yml --verbose ./... --allow-parallel-runners @ echo "revive ..." @ revive -formatter friendly -config $(ROOT_PATH)/revive.toml ./... ->>>>>>> f916e90eb (rule_checker: can replace unhealthPeer with orphanPeer (#6831)) tidy: @ go mod tidy diff --git a/tests/integrations/tso/Makefile b/tests/integrations/tso/Makefile index 93ac0c498925..c7aba3c0af22 100644 --- a/tests/integrations/tso/Makefile +++ b/tests/integrations/tso/Makefile @@ -19,15 +19,10 @@ SHELL := env PATH='$(PATH)' GOBIN='$(GO_TOOLS_BIN_PATH)' $(shell which bash) static: install-tools @ gofmt -s -l -d . 2>&1 | awk '{ print } END { if (NR > 0) { exit 1 } }' -<<<<<<< HEAD - @ golangci-lint run ./... - @ revive -formatter friendly -config $(ROOT_PATH)/revive.toml . -======= @ echo "golangci-lint ..." @ golangci-lint run -c $(ROOT_PATH)/.golangci.yml --verbose ./... --allow-parallel-runners @ echo "revive ..." @ revive -formatter friendly -config $(ROOT_PATH)/revive.toml ./... ->>>>>>> f916e90eb (rule_checker: can replace unhealthPeer with orphanPeer (#6831)) tidy: @ go mod tidy