From 00320898b17397acab9b97694f3140fde88442bd Mon Sep 17 00:00:00 2001 From: lhy1024 Date: Mon, 9 Dec 2024 19:46:09 +0800 Subject: [PATCH] fix lint Signed-off-by: lhy1024 --- server/cluster/cluster.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/server/cluster/cluster.go b/server/cluster/cluster.go index eb85b051ad1..7ab9e60a1e4 100644 --- a/server/cluster/cluster.go +++ b/server/cluster/cluster.go @@ -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 { + log.Error("failed to stop TSO jobs", errs.ZapError(err)) + return } }() failpoint.Inject("raftClusterReturn", func(val failpoint.Value) {