From 887331d3cf22c64230d6b2cb14feb31804afa634 Mon Sep 17 00:00:00 2001 From: tiancaiamao Date: Thu, 4 May 2023 17:59:55 +0800 Subject: [PATCH] meta/autoid: enable etcd client auto sync for autoid service (#43529) close pingcap/tidb#42643 --- meta/autoid/autoid.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/meta/autoid/autoid.go b/meta/autoid/autoid.go index 4cd03bea89219..897e94f67d448 100644 --- a/meta/autoid/autoid.go +++ b/meta/autoid/autoid.go @@ -586,8 +586,9 @@ func newSinglePointAlloc(store kv.Storage, dbID, tblID int64, isUnsigned bool) * } if len(addrs) > 0 { etcdCli, err := clientv3.New(clientv3.Config{ - Endpoints: addrs, - TLS: ebd.TLSConfig(), + Endpoints: addrs, + AutoSyncInterval: 30 * time.Second, + TLS: ebd.TLSConfig(), }) if err != nil { logutil.BgLogger().Error("[autoid client] fail to connect etcd, fallback to default", zap.Error(err))