client-go icon indicating copy to clipboard operation
client-go copied to clipboard

PD:tso:ErrGenerateTimestamp errors should not appear on the application side

Open yilongrong opened this issue 2 years ago • 0 comments

When upgrading a TiDB cluster, PD changes the leader. PD:tso:ErrGenerateTimestamp error will appear on application side.In fact, the PD leader switchover only took 1-2 s. Retries should be added to reduce the probability of this error occurring on application side.

[2023/08/10 04:03:48.262 +00:00] [ERROR] [client.go:857] ["[pd] getTS error"] [dc-location=global] [stream-addr=https://db-pd-2.db-pd-peer.tidbxxxxxxx.svc:2379] [error="[PD:client:ErrClientGetTSO]rpc error: code = Unknown desc = [PD:tso:ErrGenerateTimestamp]generate timestamp failed, requested pd is not leader of cluster: rpc error: code = Unknown desc = [PD:tso:ErrGenerateTimestamp]generate timestamp failed, requested pd is not leader of cluster"]

yilongrong avatar Aug 18 '23 05:08 yilongrong