fatmanverse commented on PR #11487:
URL: https://github.com/apache/seatunnel/pull/11487#issuecomment-6285562764

   Thanks @nzw921rx for the suggestion, and @DanielLeens for the detailed 
follow-up.
   
   1. **Synced with `dev`** in ca2c755 (conflict resolution only). The conflict 
was in the `startup.timestamp` / `stop.mode` rows of `MySQL-CDC.md` (en/zh): I 
kept the new `stop.mode = latest` explanation from `dev` and the snapshot-only 
notes of this PR.
   2. **Moved the snapshot-only option checks into the option rule** in d28296a:
      - `MySqlIncrementalSourceFactory#getOptionRuleBuilder` adds a 
`conditional(STARTUP_MODE, SNAPSHOT_ONLY, ...)` rule with two 
`Conditions.extension` guards from the new `MySqlSnapshotOnlyGuards`: 
`stop.mode` must be `never`, and `startup.timestamp` is not allowed. They throw 
`OptionValidationException` and keep the previous wording.
      - `startup.specific-offset.*` is already rejected for every mode other 
than `specific` by `MySqlSpecificOffsetGuards`, so I dropped that duplicated 
check.
      - `validateSnapshotOnlyConfig` is removed from the base 
`IncrementalSource`, so the base class is back to `dev` apart from the restore 
changes. Postgres and OpenGauss behave as on `dev` (their `stop.mode` only 
accepts `never`). OceanBase reuses the MySQL rule, so it gets the same guards.
      - The assertions moved from `DebeziumJsonFormatTest` (now unchanged from 
`dev`) to `MySqlIncrementalSourceFactoryTest`: `stop.mode` latest/specific, 
`startup.timestamp` and every `startup.specific-offset.*` option are rejected 
for snapshot-only; snapshot-only alone and with `stop.mode = never` stays 
valid; `timestamp` mode still requires `startup.timestamp`.
   
   Verified on JDK 17: `connector-cdc-base` (128 tests) and 
`connector-cdc-mysql` (59 tests) unit tests pass, and `connector-cdc-postgres`, 
`connector-cdc-opengauss` and `connector-cdc-oceanbase` compile.
   
   Could you take another look when you have time? 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]

Reply via email to