Skip to content

Commit

Permalink
resolve conflict
Browse files Browse the repository at this point in the history
Signed-off-by: nolouch <nolouch@gmail.com>
  • Loading branch information
nolouch committed Jul 26, 2023
1 parent 70c7621 commit 6ca69db
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 23 deletions.
5 changes: 0 additions & 5 deletions client/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 1 addition & 5 deletions pkg/schedule/checker/rule_checker.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions pkg/schedule/operator/create_operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,16 @@ 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()).
Build(0)
}

// 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).
Expand Down
5 changes: 0 additions & 5 deletions tests/integrations/mcs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 0 additions & 5 deletions tests/integrations/tso/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6ca69db

Please sign in to comment.