DanielLeens opened a new pull request, #11707:
URL: https://github.com/apache/seatunnel/pull/11707

   ### Purpose of this pull request
   
   Two related documentation gaps found while reviewing a support-bot Q&A 
export for CDC
   `job.mode`/`startup.mode`/`stop.mode` confusion, both verified directly 
against source rather than
   against the existing docs.
   
   **1. `stop.mode` was never documented for PostgreSQL-CDC or Opengauss-CDC.** 
Both
   `PostgresIncrementalSourceFactory` and `OpengaussIncrementalSourceFactory` 
register
   `PostgresSourceOptions.STOP_MODE` as an optional user-facing option, but 
neither
   `PostgreSQL-CDC.md` nor `Opengauss-CDC.md` (en or zh) ever documented it. 
Verified in
   `PostgresSourceOptions.java` that this option is a 
`SingleChoiceOption<StopMode>` restricted to
   `Arrays.asList(StopMode.NEVER)` with `defaultValue(StopMode.NEVER)` -- i.e. 
`never` is the *only*
   value the framework will accept, so this is safe to document with full 
confidence (no ambiguity
   about whether `latest`/`specific` "work"). Added the missing `stop.mode` row 
to all four files.
   
   **2. Opengauss-CDC.md's `startup.mode` row had drifted behind 
PostgreSQL-CDC.md's.**
   `OpengaussIncrementalSourceFactory` reuses 
`PostgresSourceOptions.STARTUP_MODE` directly and its
   `getSourceClass()` returns `PostgresIncrementalSource.class` -- it is 
literally the same runtime
   class as PostgreSQL-CDC, just wired to a different JDBC dialect. PR #11380 
(merged) added
   `snapshot-only` and `committed-offset` startup modes to this shared class 
and updated
   `PostgreSQL-CDC.md` accordingly, but `Opengauss-CDC.md` was not updated even 
though the same two
   modes are equally available and functional for Opengauss through the shared 
class. Brought
   `Opengauss-CDC.md`'s `startup.mode` row to parity with `PostgreSQL-CDC.md`'s 
current text.
   
   Both `docs/en` and `docs/zh` are updated in lockstep for all four files.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No functional change. Documentation-only correction and addition.
   
   ### How was this patch tested?
   
   Documentation-only change, so `./mvnw spotless:apply` is a no-op (spotless 
in this repo only formats
   `<java>` and `<pom>`, not markdown). Every claim was verified against 
current `dev` HEAD source:
   - 
`seatunnel-connectors-v2/connector-cdc/connector-cdc-postgres/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/postgres/source/PostgresSourceOptions.java`
     -- confirms `STOP_MODE`'s `SingleChoiceOption` is restricted to `[NEVER]`, 
and `STARTUP_MODE`'s is
     restricted to `[INITIAL, SNAPSHOT_ONLY, COMMITTED_OFFSET, EARLIEST, 
LATEST]`.
   - `.../connector-cdc-postgres/.../PostgresIncrementalSourceFactory.java` and
     `.../connector-cdc-opengauss/.../OpengaussIncrementalSourceFactory.java` 
-- confirm both factories'
     `optionRule()` register `PostgresSourceOptions.STARTUP_MODE`/`STOP_MODE` 
identically, and both
     `getSourceClass()`/execution paths resolve to the same 
`PostgresIncrementalSource`.
   - Checked PR #11556 (open, touches all four files I'm editing) for 
line-level overlap: its hunks are
     at lines ~199-256 in a WAL-backfill prose/example section, while mine are 
in the options table at
     lines ~77-101 -- disjoint, no conflict.
   
   ### Check list
   
   * [x] No new JAR binary package is added.
   * [x] English and Chinese documentation both updated.
   * [x] No incompatible configuration or API change is introduced (docs-only).
   * [x] N/A -- documentation-only change, no test coverage applicable.


-- 
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