cdc exit with error: etcdserver: mvcc: required revision has been compacted
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 56
- Forks
- 63
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 34
Description
What did you do?
- inject network partition between pd and cdc for a while
What did you expect to see?
cdc works normally
What did you see instead?
one cdc node exited with error:
[2025/11/04 15:06:16.702 +08:00] [WARN] [server.go:131] ["cdc server exits with error"] [error="etcdserver: mvcc: required revision has been compacted"] errorVerbose="etcdserver: mvcc: required revision has been compacted[ngithub.com/pingcap/errors.Trace\n\tgithub.com/pingcap/errors@v0.11.5-0.20250523034308-74f78ae071ee/juju_adaptor.go:15\ngithub.com/pingcap/ticdc/pkg/orchestrator.(*EtcdWorker).Run\n\tgithub.com/pingcap/ticdc/pkg/orchestrator/etcd_worker.go:195\ngithub.com/pingcap/ticdc/server/watcher.(*EtcdWatcher).RunEtcdWorker\n\tgithub.com/pingcap/ticdc/server/watcher/etcd_watcher.go:61\ngithub.com/pingcap/ticdc/server/watcher.(*NodeManager).Run\n\tgithub.com/pingcap/ticdc/server/watcher/module_node_manager.go:169\ngithub.com/pingcap/ticdc/server.(*server).Run.(*server).Run.func2.func7\n\tgithub.com/pingcap/ticdc/server/server.go:317\ngolang.org/x/sync/errgroup.(*Group).Go.func1\n\tgolang.org/x/sync@v0.17.0/errgroup/errgroup.go:93\nruntime.goexit\n\truntime/asm_amd64.s:1700
Versions of the cluster
Upstream TiDB cluster version (execute SELECT tidb_version(); in a MySQL client):
(paste TiDB cluster version here)
Upstream TiKV version (execute tikv-server --version):
(paste TiKV version here)
TiCDC version (execute cdc version):
(paste TiCDC version here)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the network-partition scenario and trace the failure at pkg/orchestrator/etcd_worker.go:195 through server/watcher/etcd_watcher.go and server/watcher/module_node_manager.go. Reproduce the compacted-revision error if possible, then establish the expected recovery behavior for the CDC node and add coverage for that behavior. The missing cluster and TiCDC versions should be collected before implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend, distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100