Skip to content

Commit

Permalink
Add start-stop logs for the deadline watcher
Browse files Browse the repository at this point in the history
Signed-off-by: JmPotato <ghzpotato@gmail.com>
  • Loading branch information
JmPotato committed Apr 30, 2024
1 parent 90c9f6e commit e9df606
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions client/tso_dispatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ func newTSODispatcher(
}

func (td *tsoDispatcher) watchTSDeadline() {
log.Info("[tso] start tso deadline watcher", zap.String("dc-location", td.dc))
for {
select {
case d := <-td.tsDeadlineCh:
Expand All @@ -129,6 +130,7 @@ func (td *tsoDispatcher) watchTSDeadline() {
timerpool.GlobalTimerPool.Put(d.timer)
case <-td.ctx.Done():
timerpool.GlobalTimerPool.Put(d.timer)
log.Info("[tso] exit tso deadline watcher", zap.String("dc-location", td.dc))
return
}
case <-td.ctx.Done():
Expand Down

0 comments on commit e9df606

Please sign in to comment.