ryanmeowy commented on issue #11007:
URL: https://github.com/apache/seatunnel/issues/11007#issuecomment-6057551806
Hi, I would like to claim the `connector-cdc` slice, starting with a focused
first PR: **declarative conditional coverage for MySQL-family CDC
`startup.mode=specific`**.
Audit on current `dev` (3ac7003f):
- In `MySqlIncrementalSourceFactory#getOptionRuleBuilder()`, the five
options `startup.specific-offset.file / pos / gtid-set / skip-events /
skip-rows` are declared inside the first `.optional(...)` block (lines 94-98),
and the existing `conditional` chain (lines 102-116) covers `INITIAL →
exactly_once`, `STOP SPECIFIC → file/pos`, and `TIMESTAMP → startup.timestamp`,
but there is **no conditional binding these options to
`startup.mode='specific'`**.
- As a result, all related errors surface only at runtime today:
- `MySqlIncrementalSource.java:109-113` —
`IllegalArgumentException("'startup.specific-offset.file' and '…pos' must be
configured together when 'startup.mode' is 'specific'.")`
- `MySqlIncrementalSource.java:116-121` —
`IllegalArgumentException("'startup.mode' requires '…file' with '…pos' when the
mode is 'specific'.")`
- `MySqlIncrementalSource.java:134-138` — blank file value
- `MySqlIncrementalSource.java:188-196` — `"'startup.specific-offset.*'
options can only be used when 'startup.mode' is 'specific', but current mode is
'…'."`
Moving the ones expressible in the DSL forward would let `seatunnel.sh
--check` reject these misconfigurations at submission time instead of a running
job failing later.
- `OceanBaseIncrementalSourceFactory extends MySqlIncrementalSourceFactory`
(`OceanBaseIncrementalSourceFactory.java:46`), so this rule change benefits
OceanBase CDC as well.
Proposed scope for this slice:
1. Add `.conditional(STARTUP_MODE, SPECIFIC, file, pos, gtid-set,
skip-events, skip-rows)` to `MySqlIncrementalSourceFactory`.
2. Keep the deeper runtime pairing rules (file + pos must be configured
together, non-blank file) where the DSL does not express them.
3. Add negative-case assertions in `MySqlIncrementalSourceFactoryTest`
covering: mode ≠ specific with specific-offset.* present; mode = specific
without file/pos; blank file value.
4. Check EN/ZH docs against the resulting behavior.
If this scope sounds right I'll open a focused PR against `dev` and link it
here. Happy to re-scope if maintainers prefer to split it further. Thanks!
--
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]