*: TiDB and TiCDC use inconsistent etcd addresses and key formats
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Bug Report
Please answer these questions before submitting your issue. Thanks!
## Bug Report
### 1. Minimal reproduce step (Required)
1. Etcd key format problem:
1.1. start a keyspace TiDB
1.2. Start a CDC task for the keyspace.
2. Etcd addrs problem:
2.1. enable `meta-service-group` to use external etcd, assign a keyspace to this `meta-service-group` and bootstrap the keyspace TiDB.
2.2. Start a CDC task for the keyspace.
### 2. What did you expect to see? (Required)
BR/Lightning/IMPORT INTO should read the CDC key from the correct etcd addrs and key formats.
### 3. What did you see instead (Required)
1. Etcd key format: If use keyspace, CDC writes etcd key without `/keyspaces/tidb/$keyspace_id` prefix, But TiDB BR/Lightning/IMPORT INTO and `GetTiCDCServerInfo` reads CDC key with keyspace prefix (`/keyspaces/tidb/$keyspace_id`).
* `/tidb/cdc/` for BR/Lightning/IMPORT INTO
* `/topology/ticdc` for `GetTiCDCServerInfo`
2. Etcd addrs: If keyspace assign to a `meta service group`(a external etcd cluster), CDC etcd keys are still stored in PD etcd, but TiDB reads CDC etcd key from the external etcd.
CDC keys are missed, so the CDC check can be bypassed, and `GetTiCDCServerInfo` can not get CDC topology.
### 4. What is your TiDB version? (Required)
master
tidb-cse(main-8.5-keyspace)
Contributor guide
Research direction
Start by tracing the BR/Lightning/IMPORT INTO CDC-key readers, GetTiCDCServerInfo, and the CDC writers described in the report. Compare their etcd address selection and key formats for keyspaces and external meta-service groups. Done means all readers and writers use the intended addresses and prefixes, with the CDC check and topology lookup working in both scenarios.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- databases, distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100