From 683f3b18b0f4580da6bd2af651084da3a9a77919 Mon Sep 17 00:00:00 2001 From: tiancaiamao Date: Thu, 4 May 2023 17:06:50 +0800 Subject: [PATCH] meta/autoid: enable etcd client auto sync for autoid service --- 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))