Skip to content

dispatcher: out-of-date/mismatched block action still reports DONE #4331

@3AceShowHand

Description

@3AceShowHand

What did you do?

  1. 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/
  2. Observed duplicated/mixed block actions (Write/Pass) for the same dispatcher + commitTs.
  3. In BasicDispatcher.HandleDispatcherStatus, when action does not match current pending block event, code still executes Step3 and reports BlockStage_DONE:
    • downstreamadapter/dispatcher/basic_dispatcher.go:829-839
  4. 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 nil
    • No 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions