dispatcher: out-of-date/mismatched block action still reports DONE
Open
Nobody has claimed this yet.
severity/moderate
type/bug
- Dominant language
- Go
- Stars
- 56
- Forks
- 63
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 34
Description
What did you do?
- Ran storage integration heavy CI job:
https://prow.tidb.net/jenkins/blue/organizations/jenkins/pingcap%2Fticdc%2Fpull_cdc_storage_integration_heavy/detail/pull_cdc_storage_integration_heavy/525/pipeline/449/ - Observed duplicated/mixed block actions (Write/Pass) for the same dispatcher + commitTs.
- In
BasicDispatcher.HandleDispatcherStatus, when action does not match current pending block event, code still executes Step3 and reportsBlockStage_DONE:downstreamadapter/dispatcher/basic_dispatcher.go:829-839
- Maintainer later receives DONE for missing event and logs:
maintainer/barrier.go"event is nil"maintainer/barrier.go"No block event found"
What did you expect to see?
- Outdated or action-mismatched status should be ignored (or handled idempotently) without reporting DONE.
- Maintainer should not receive DONE for already-cleared/non-matching events.
- Barrier state should remain clean under duplicated/late actions.
What did you see instead?
- Dispatcher still reports DONE in the mismatch/outdated path.
- Maintainer logs frequent:
event is nilNo block event found
- In the same failing run, storage consumer later hit downstream inconsistency symptoms (including missing table errors), with potential timing/state-noise amplification.
Versions of the cluster
Upstream TiDB cluster version (execute SELECT tidb_version(); in a MySQL client):
(unknown from CI artifact; please fill if available)
Upstream TiKV version (execute tikv-server --version):
(unknown from CI artifact; please fill if available)
TiCDC version (execute cdc version):
CI run on pingcap/ticdc pull_cdc_storage_integration_heavy #525 (2026-03-03).
Local analysis branch head: da1038b2f
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 by reading BasicDispatcher.HandleDispatcherStatus in downstreamadapter/dispatcher/basic_dispatcher.go:829-839, then inspect the related event handling and logs in maintainer/barrier.go. Use the referenced storage integration CI run to examine duplicated or mismatched actions; done means late or mismatched statuses no longer report BlockStage_DONE or produce missing-event noise.
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
- Mostly clear
- Newbie friendliness
- 35/100