fatmanverse commented on issue #11036:
URL: https://github.com/apache/seatunnel/issues/11036#issuecomment-5011031534

   Hi @davidzollo, I'd like to work on this. I've traced the CDC base control 
path and here's my implementation plan:
   
   **Config**
   - Add `SNAPSHOT` to the shared `StartupMode` enum (appended at the end, so 
existing ordinals stay stable for the `Serializable` `StartupConfig`).
   - Expose it **only** in MySQL's `STARTUP_MODE` singleChoice list. Other CDC 
connectors deliberately keep their current modes, so `startup.mode = 
"snapshot"` is rejected at validation for them.
   
   **Runtime (base, opt-in via startup mode)**
   - Route `INITIAL || SNAPSHOT` to `HybridSplitAssigner` in both 
`createEnumerator` and `restoreEnumerator`; thread a `snapshotOnly` flag 
(derived from `sourceConfig` startup mode, not persisted) into both 
constructors.
   - Short-circuit **both** `getNext()` and `waitingForCompletedSplits()` once 
the snapshot side is complete (`snapshotOnly && 
snapshotSplitAssigner.isCompleted()`), so the enumerator reaches 
`signalNoMoreSplits` and the job finishes cleanly instead of transitioning into 
binlog reading.
   - `getBoundedness()` returns `BOUNDED` for snapshot-only regardless of stop 
mode.
   
   **Validation**: fail-fast on incompatible combinations (snapshot-only 
together with a non-default stop mode or binlog specific-offset options).
   **Docs + tests**: update `docs/en` and `docs/zh`, and add a focused E2E 
proving the job completes after the snapshot with **no binlog reader started** 
(as you called out).
   
   Scope note: although this is filed as MySQL-only, the snapshot machinery 
lives in the shared CDC base, so the base changes are unavoidable; connectors 
opt in through their option list. I'll call this out explicitly in the PR.
   
   Could you assign this to me?
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to