Skip to content

Commit

Permalink
fix reset ts
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Leung <[email protected]>
  • Loading branch information
rleungx committed Apr 13, 2023
1 parent 4bd23b2 commit 5122707
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 5122707

Please sign in to comment.