From 0c1cb168c4d214ffa01bf2df721bbabcf9b1f568 Mon Sep 17 00:00:00 2001 From: ystaticy Date: Thu, 2 Feb 2023 10:13:33 +0800 Subject: [PATCH] add comnments Signed-off-by: ystaticy --- domain/infosync/info.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/domain/infosync/info.go b/domain/infosync/info.go index f6dbecca0817c..6c9e721959cf9 100644 --- a/domain/infosync/info.go +++ b/domain/infosync/info.go @@ -95,7 +95,12 @@ var ErrPrometheusAddrIsNotSet = dbterror.ClassDomain.NewStd(errno.ErrPrometheusA // InfoSyncer stores server info to etcd when the tidb-server starts and delete when tidb-server shuts down. type InfoSyncer struct { - etcdCli *clientv3.Client + // `etcdClient` must be used when keyspace is not set, or when the logic to each etcd path needs to be separated by keyspace. + etcdCli *clientv3.Client + // `unprefixedEtcdCli` will never set the etcd namespace prefix by keyspace. + // It is only used in storeMinStartTS and RemoveMinStartTS now. + // It must be used when the etcd path isn't needed to separate by keyspace. + // See keyspace RFC: https://github.com/pingcap/tidb/pull/39685 unprefixedEtcdCli *clientv3.Client info *ServerInfo serverInfoPath string