You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "zhang-arvin (via GitHub)" <gi...@apache.org> on 2026/08/18 23:09:37 UTC
[PR] [Fix][Connector-V2] Fix MySQL CDC recovered splits not assigned to readers after restart [seatunnel]
zhang-arvin opened a new pull request, #11862:
URL: https://github.com/apache/seatunnel/pull/11862
## Purpose
Fixes #11676: MySQL CDC job runs but writes nothing after failure restart — restored splits never assigned to the waiting reader.
## Root Cause
`IncrementalSourceEnumerator.addSplitsBack()` only called `splitAssigner.addSplits(splits)` without re-triggering `assignSplits()`. When the restored split arrived after the reader had already sent its split request (parked in `readersAwaitingSplit`), the split sat in the assigner but was never dispatched to the waiting reader, causing the CDC job to silently produce no data.
## Fix
- Made `addSplitsBack()` synchronized (matching other state-modifying methods: `run()`, `handleSplitRequest()`, `notifyCheckpointComplete()`)
- Added `if (running) assignSplits()` after adding restored splits to the assigner, so the restored split is immediately dispatched to the currently waiting reader
This is a 3-line change in `IncrementalSourceEnumerator.java`.
## Verification
- Unit tests: `IncrementalSourceEnumeratorTest#shouldAssignRestoredSplitsToWaitingReader` and `#shouldNotAssignSplitsBackWhenNotRunning` — both pass (2/2)
- `./mvnw spotless:apply` passes
- `./mvnw test -pl connector-cdc-base -Dtest=IncrementalSourceEnumeratorTest` — BUILD SUCCESS
## Changes
- `connector-cdc/connector-cdc-base/.../enumerator/IncrementalSourceEnumerator.java` — +3 lines (synchronized + assignSplits)
- `connector-cdc/connector-cdc-base/.../enumerator/IncrementalSourceEnumeratorTest.java` — new test file with 2 test cases
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Connector-V2] Fix MySQL CDC recovered splits not assigned to readers after restart [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #11862:
URL: https://github.com/apache/seatunnel/pull/11862#issuecomment-5551394551
CI record update: my 2026-08-24 comment confirmed a fresh green `Build` run on this exact head and closed out the `PostgresCDCIT`/`updated-modules-integration-test-part-1` flake I'd flagged earlier. That green result is now stale — the `Build` check has since been re-run on this same head (as part of the same batch retrigger across several of your other open PRs) and this time `updated-modules-integration-test-part-1 (11, ubuntu-latest)` failed again.
The code here is unchanged since my last approval, and this is the exact same test bucket that flaked once before on this very PR, so I'd treat this as a recurrence of that same environmental flake rather than a new problem introduced by the MySQL-CDC split-recovery fix (which doesn't touch that integration-test module). A rerun of the failing job should be the first step; no code change should be needed on your side unless the rerun fails again with the same specific test.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Connector-V2] Fix MySQL CDC recovered splits not assigned to readers after restart [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #11862:
URL: https://github.com/apache/seatunnel/pull/11862#issuecomment-5617176514
CI-fact update: the `Build` check on this exact head has since completed with failure (it was still in_progress at review time). `updated-modules-integration-test-part-1 (8)` failed again, consistent with the unrelated flake pattern already noted on this PR. Two additional jobs also failed: `doris-connector-it (8 and 11)` and `iceberg-connector-it (8)`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Connector-V2] Fix MySQL CDC recovered splits not assigned to readers after restart [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #11862:
URL: https://github.com/apache/seatunnel/pull/11862#issuecomment-5379455188
Quick status update, no new commit since my last review/approval.
CI has now completed on the fork (run 32344814795) and shows one failing job: `updated-modules-integration-test-part-1 (11, ubuntu-latest)`. I pulled the raw log rather than trusting the job name - the failure is:
```
PostgresCDCIT.testPostgresCdcSnapshotOnlyAndCommittedOffsetStartupModes:629 » ConditionTimeout
org.awaitility.core.ConditionTimeoutException: ... expected: <1> but was: <0> within 2 minutes.
```
I checked whether this could plausibly be caused by this PR's change (since `IncrementalSourceEnumerator` is shared by Postgres CDC too): the fix here only adds an extra, immediate `assignSplits()` call after re-inserting restored splits - it doesn't remove or alter any existing dispatch path, so it shouldn't be able to cause a split/offset to go missing. That's consistent with what I'm seeing elsewhere: this is the exact same test method and exact same `ConditionTimeoutException` signature I already flagged as an unrelated, pre-existing environmental flake on PR #11850 two days ago - a PR that doesn't touch any CDC code at all. Seeing the identical failure independent of diff content is good evidence this is a flaky test in general, not something this change introduced.
No action needed on the code side. This just needs a clean CI rerun; once it comes back green my "Ready to merge" from the previous review stands.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Connector-V2] Fix MySQL CDC recovered splits not assigned to readers after restart [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #11862:
URL: https://github.com/apache/seatunnel/pull/11862#issuecomment-5385695557
Thanks for confirming, @zhang-arvin! I double-checked the PR head SHA directly and it's still `02ed4e06`, which is exactly the commit I already reviewed and approved (the one that added the INFO re-dispatch log and fixed the spotless formatting) — so there's nothing new to re-review here. My "Ready to merge" from the previous round stands.
The only remaining item is CI, which looks like it's back in progress after the rerun. Once it comes back green, this should be all set from my side.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Connector-V2] Fix MySQL CDC recovered splits not assigned to readers after restart [seatunnel]
Posted by "zhang-arvin (via GitHub)" <gi...@apache.org>.
zhang-arvin commented on PR #11862:
URL: https://github.com/apache/seatunnel/pull/11862#issuecomment-5380273942
@DanielLeens All changes from the review are already pushed in commit dba09e1. No new commits pending. The branch is up to date with the fork. Thanks for the review!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Connector-V2] Fix MySQL CDC recovered splits not assigned to readers after restart [seatunnel]
Posted by "zhang-arvin (via GitHub)" <gi...@apache.org>.
zhang-arvin commented on PR #11862:
URL: https://github.com/apache/seatunnel/pull/11862#issuecomment-6051959809
CI-fact update and a genuine new commit. Rebased onto the current `dev` tip; the head moved this round rather than staying fixed:
- old head: `17fac59e4f951077ae4d324daed2d2a381f703ce`
- new head: `6ba2f78419830581bf384e942dd3b8428bdd1299`
The PR's own content is unchanged (`git diff 17fac59e4..6ba2f7841` over the PR-scoped files is empty), so the previous approvals still apply. This clears the base drift, re-triggers `Build` on a fresh SHA, and pulls in `#12639` which fixes the `Dead links` 429 failures. The `updated-modules-integration-test-part-*` failures previously seen here are the unrelated flake pattern already noted.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Fix][Connector-V2] Fix MySQL CDC recovered splits not assigned to readers after restart [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #11862:
URL: https://github.com/apache/seatunnel/pull/11862#issuecomment-5385702786
Thanks for confirming, @zhang-arvin. I've double-checked: the current head (`02ed4e06a341`) matches what I already approved — it's the same content I reviewed as `dba09e18b`, just carrying a different hash from a rebase in between, not a new commit. No new review is needed on my side.
My "Ready to merge" from the last round stands. This is now purely waiting on a clean CI rerun to clear the `PostgresCDCIT` flake I flagged (same pre-existing, diff-independent failure I'd already seen on an unrelated PR). I'll take another look immediately if anything actually changes on this branch.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org