# [KB]关于 TiCDC 无法删除 changefeed 同步任务的问题

## Description

1. TiCDC 创建多个相同 changefeed 同步任务，发现出现 deadlock，执行命令 cdc cli changefeed remove --pd=`http://xxx.xxx.xxx.xxx:2379` --changefeed-id simple-replication-task 无法删除同步任务，即使添加选项 '--force' 强制删除，也依然没有效果；

2. 查询同步任务状态，会有如下类似的报错信息：

    ```golang
    “code”: “CDC:ErrProcessorUnknown”,
    “message”: “[CDC:ErrMySQLTxnError]Error 1146: Table ‘xxx.xxx’ doesn’t exist”
    ```

## Root Cause

TiCDC 内部逻辑 Bug，修复 PR [https://github.com/pingcap/ticdc/pull/2142](https://github.com/pingcap/ticdc/pull/2142)

## Diagnostic Steps

N/A

## Resolution

升级 TiCDC 至 v5.0.3 或 v5.1.1 及以上版本

## Workaround

1. 测试环境，可以清理 TiCDC 所有任务元信息，命令：

    ```
    cdc cli unsafe reset --pd="http://<pd-ip>:<pd-port>"
    ```

2. 生产环境，停止 TiCDC 节点，手动删除 changefeed_id，命令：

    ```
    ETCDCTL_API=3 tiup ctl:<cluster-version> etcd --endpoints=http://<pd-ip>:<pd-port> del /tidb/cdc/changefeed/info/<changefeed_id>
    ```

## Affect Version(optional)

v5.0.0,v5.0.1,v5.0.2,v5.1.0
