From 3982c06d77511df1bc765ceffa7d12776dfa6db0 Mon Sep 17 00:00:00 2001 From: CharlesCheung <61726649+CharlesCheung96@users.noreply.github.com> Date: Mon, 19 Feb 2024 11:24:08 +0800 Subject: [PATCH] fix cdc (#1643) Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com> --- pkg/utils/topology/ticdc.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/utils/topology/ticdc.go b/pkg/utils/topology/ticdc.go index 3bf1cdb6bd..46e4024b93 100644 --- a/pkg/utils/topology/ticdc.go +++ b/pkg/utils/topology/ticdc.go @@ -19,8 +19,7 @@ import ( // TODO: refactor this with topology prefix since it is compatible with other components. const ( - ticdcTopologyKeyPrefix = "/tidb/cdc/" - ticdcCaptureKeyIdent = "__cdc_meta__/capture/" + ticdcTopologyKeyPrefix = "/topology/ticdc/" ) func FetchTiCDCTopology(ctx context.Context, etcdClient *clientv3.Client) ([]TiCDCInfo, error) { @@ -35,7 +34,7 @@ func FetchTiCDCTopology(ctx context.Context, etcdClient *clientv3.Client) ([]TiC nodes := make([]TiCDCInfo, 0) for _, kv := range resp.Kvs { key := string(kv.Key) - if !strings.HasPrefix(key, ticdcTopologyKeyPrefix) || !strings.Contains(key, ticdcCaptureKeyIdent) { + if !strings.HasPrefix(key, ticdcTopologyKeyPrefix) { continue }