Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
Signed-off-by: lhy1024 <[email protected]>
  • Loading branch information
lhy1024 committed Dec 9, 2024
1 parent 13b2b32 commit 0032089
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions server/cluster/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,12 @@ func (c *RaftCluster) Start(s Server) error {
defer func() {
// We need to try to stop tso jobs when the cluster is not running.
// Ref: https://github.com/tikv/pd/issues/8836
if !c.running {
c.stopTSOJobsIfNeeded()
if c.running {
return
}
if err := c.stopTSOJobsIfNeeded(); err != nil {

Check failure on line 338 in server/cluster/cluster.go

View workflow job for this annotation

GitHub Actions / tso-function-test

c.stopTSOJobsIfNeeded() (no value) used as value

Check failure on line 338 in server/cluster/cluster.go

View workflow job for this annotation

GitHub Actions / chunks (3, Unit Test(3))

c.stopTSOJobsIfNeeded() (no value) used as value

Check failure on line 338 in server/cluster/cluster.go

View workflow job for this annotation

GitHub Actions / chunks (1, Unit Test(1))

c.stopTSOJobsIfNeeded() (no value) used as value

Check failure on line 338 in server/cluster/cluster.go

View workflow job for this annotation

GitHub Actions / chunks (4, Tests(1))

c.stopTSOJobsIfNeeded() (no value) used as value

Check failure on line 338 in server/cluster/cluster.go

View workflow job for this annotation

GitHub Actions / statics

c.stopTSOJobsIfNeeded() (no value) used as value
log.Error("failed to stop TSO jobs", errs.ZapError(err))
return
}
}()
failpoint.Inject("raftClusterReturn", func(val failpoint.Value) {
Expand Down

0 comments on commit 0032089

Please sign in to comment.