Skip to content

FLINK-38334: Fix MySQL CDC source stuck in INITIAL_ASSIGNING#4278

Open
morozov wants to merge 1 commit intoapache:masterfrom
morozov:FLINK-38334
Open

FLINK-38334: Fix MySQL CDC source stuck in INITIAL_ASSIGNING#4278
morozov wants to merge 1 commit intoapache:masterfrom
morozov:FLINK-38334

Conversation

@morozov
Copy link
Contributor

@morozov morozov commented Feb 15, 2026

When a table is excluded from configuration after a restart from savepoint, the MySQL CDC source could get stuck in the INITIAL_ASSIGNING state. This happened because table exclusion cleanup was only performed when isAssigningFinished() was true, but the assigner couldn't finish because excluded table splits were never reported as finished.

The fix separates two concerns in captureNewlyAddedTables():

  • Adding new tables: should only happen when isAssigningFinished()
  • Removing excluded tables: must happen regardless of assigner status

Added integration test TableExclusionDuringSnapshotIT that reproduces the issue by using a blocking hook to take a savepoint during INITIAL_ASSIGNING phase, then restarting with a table excluded from configuration.

When a table is excluded from configuration after a restart from savepoint,
the MySQL CDC source could get stuck in the INITIAL_ASSIGNING state. This
happened because table exclusion cleanup was only performed when
isAssigningFinished() was true, but the assigner couldn't finish because
excluded table splits were never reported as finished.

The fix separates two concerns in captureNewlyAddedTables():
- Adding new tables: should only happen when isAssigningFinished()
- Removing excluded tables: must happen regardless of assigner status

Added integration test TableExclusionDuringSnapshotIT that reproduces the
issue by using a blocking hook to take a savepoint during INITIAL_ASSIGNING
phase, then restarting with a table excluded from configuration.
@morozov
Copy link
Contributor Author

morozov commented Feb 16, 2026

@leonardBang could you approve running the workflow?

@morozov
Copy link
Contributor Author

morozov commented Feb 17, 2026

The tests are failing due a Docker API incompatibility issue. It looks like you guys are working on it in #4275.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments