Skip to content

Commit

Permalink
*: fix TestConcurrentlyReset (#6318)
Browse files Browse the repository at this point in the history
close #6275

Signed-off-by: Ryan Leung <rleungx@gmail.com>

Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
  • Loading branch information
rleungx and ti-chi-bot committed Apr 13, 2023
1 parent ab0dbdc commit 9aa77c4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/tso/global_allocator.go
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,11 @@ func (gta *GlobalTSOAllocator) campaignLeader() {
}()

gta.member.EnableLeader()
defer resetLeaderOnce.Do(func() {
cancel()
gta.member.ResetLeader()
})

// TODO: if enable-local-tso is true, check the cluster dc-location after the primary is elected
// go gta.tsoAllocatorManager.ClusterDCLocationChecker()
log.Info("tso primary is ready to serve", zap.String("tso-primary-name", gta.member.Name()))
Expand Down

0 comments on commit 9aa77c4

Please sign in to comment.