DanielLeens commented on PR #11885: URL: https://github.com/apache/seatunnel/pull/11885#issuecomment-5611986044
@SEZ9 fair ask — here are the concrete hunks at `befad345c`, re-verified by me just now against the raw files (not the summary): **F1/F6** — `IncrementalPhaseState.java`: the field is `private final Offset stopOffset;` at line 39, with `serialVersionUID` unchanged at line 29. `IncrementalPhaseStateTest.java`: - `shouldPreserveStopOffsetThroughJavaSerializationRoundTrip` (lines 35-47) builds a state with a non-null `stopOffset`, round-trips it through a real `ObjectOutputStream`/`ObjectInputStream` (the `roundTrip()` helper at lines 64-73), and asserts the value survives. - `shouldDefaultStopOffsetToNullOnLegacySerializedState` (lines 50-62) constructs `IncrementalPhaseState` via the legacy single-arg constructor (no `stopOffset`), round-trips it the same way, and asserts `getStopOffset()` comes back `null` — this is the pre-upgrade-checkpoint case. **F2** — `IncrementalSplitAssigner.java`: the guard is `if (resolvedStopOffset == null && sourceConfig.getStopConfig().getStopMode() == StopMode.LATEST)` at lines 329-330, inside `createIncrementalSplit()` (method starts line 265); `resolvedStopOffset` is declared at line 94 and restored from checkpoint state at line 124. The "only after snapshot completion" guarantee is in `HybridSplitAssigner.java#getNext()`, lines 100-113: it returns from `snapshotSplitAssigner` while `!snapshotSplitAssigner.noMoreSplits()` (100-103) or `Optional.empty()` while `!snapshotSplitAssigner.isCompleted()` (104-107), and only reaches `incrementalSplitAssigner.getNext()` (which is what calls `createIncrementalSplit()`) at line 113, after both gates pass. **F5** — `IncrementalSplitAssigner.java#resolveLatestStopOffsetWithRetry()`, lines 389-414: `final int maxRetries = 3` (390), `Thread.sleep(300L * attempt)` (397, so 300ms then 600ms on attempts 1 and 2), final attempt rethrows wrapped as `SeaTunnelException` (406-410). Called from line 335. **F3** — `MysqlCDCStopModeSpecificIT.java`, lines 419-422: `Assertions.assertNull(queryVarcharById(2000), "snapshot finished too early: last-chunk row already in sink; increase the initial bulk row count")`, gated behind the id=1 wait at lines 406-412. **F4/F7/F8** — `docs/en/connectors/source/MySQL-CDC.md` diff hunk updates the `stop.mode` option-table row (the `latest` cell) and adds a new worked `hocon` example + explanatory paragraph right after the existing bounded-read note (`docs/zh` carries the equivalent edit). PR description's "Does this PR introduce any user-facing change?" section states the snapshot-completion semantics directly, and the `Docs updated` checkbox in the PR body is ticked (`- [x] Docs updated (...)`). All of the above is me re-reading the actual file contents at `befad345c` just now, not re-quoting my own or li3zhi4's earlier prose — happy to point at anything else that's still unclear. -- 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]
