Skip to content

Commit

Permalink
update interval
Browse files Browse the repository at this point in the history
Signed-off-by: lhy1024 <admin@liudos.us>
  • Loading branch information
lhy1024 committed Feb 5, 2025
1 parent c01a203 commit a557b40
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/tso/global_allocator.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,9 @@ func (gta *GlobalTSOAllocator) UpdateTSO() (err error) {
return nil
}
log.Warn("try to update the global tso but failed", errs.ZapError(err))
time.Sleep(gta.am.updatePhysicalInterval)
// Etcd client retry with roundRobinQuorumBackoff https://github.com/etcd-io/etcd/blob/d62cdeee4863001b09e772ed013eb1342a1d0f89/client/v3/client.go#L488
// And its default interval is 25ms, so we sleep 50ms here. https://github.com/etcd-io/etcd/blob/d62cdeee4863001b09e772ed013eb1342a1d0f89/client/v3/options.go#L53
time.Sleep(50 * time.Millisecond)
}
return
}
Expand Down

0 comments on commit a557b40

Please sign in to comment.