li3zhi4 commented on PR #11885:
URL: https://github.com/apache/seatunnel/pull/11885#issuecomment-5613387235

   @SEZ9 Here are the concrete locations at `befad345c`:\n\n- **F1/F6** \u2014 
`connector-cdc-base/src/test/java/org/apache/seatunnel/connectors/cdc/base/source/enumerator/state/IncrementalPhaseStateTest.java`:\n
  - Real-serialization round-trip: 
`shouldPreserveStopOffsetThroughJavaSerializationRoundTrip` (lines 34-47); the 
`roundTrip(...)` helper (lines 64-73) uses real 
`ObjectOutputStream`/`ObjectInputStream` over a `ByteArrayOutputStream` \u2014 
the same mechanism the engine's `DefaultSerializer` \u2192 `SerializationUtils` 
uses, so it exercises the actual persistence path.\n  - Pre-upgrade case: 
`shouldDefaultStopOffsetToNullOnLegacySerializedState` (lines 49-62) \u2014 
simulates a checkpoint written before the `stopOffset` field existed via the 
single-arg constructor (exactly the call shape old versions persisted); with 
the unchanged `serialVersionUID`, Java field-evolution defaults the missing 
field to `null` on the real round-trip (asserted at line 61).\n  - For context: 
`conn
 ector-cdc-base` has no `PendingSplitsStateSerializer` class, and 
`IncrementalSource` has no `getEnumeratorStateSerializer` override \u2014 the 
engine uses the interface default `DefaultSerializer` \u2192 
`SerializationUtils` (plain object streams).\n\n- **F2** \u2014 
`IncrementalSplitAssigner.java`:\n  - Guard: lines 329-343 \u2014 `if 
(resolvedStopOffset == null && sourceConfig.getStopConfig().getStopMode() == 
StopMode.LATEST) { resolvedStopOffset = 
resolveLatestStopOffsetWithRetry(sourceConfig); ... }`, then 
`incrementalSplitStopOffset = resolvedStopOffset != null ? resolvedStopOffset : 
...` \u2014 one authoritative resolution point, cached, reused for every 
subsequent split.\n  - Snapshot-completion ordering: 
`HybridSplitAssigner.getNext()` lines 98-117 \u2014 returns snapshot splits 
while `!snapshotSplitAssigner.noMoreSplits()`, returns empty while the snapshot 
assigner is not completed, and only reaches 
`incrementalSplitAssigner.getNext()` after completion (ordering constraint 
 in the comment at lines 110-112).\n  - Checkpoint write: `snapshotState` line 
227 (`new IncrementalPhaseState(startupOffset, resolvedStopOffset)`); 
legacy-checkpoint restore from an in-flight split: `addSplits` lines 
210-216.\n\n- **F5** \u2014 `resolveLatestStopOffsetWithRetry()`, 
`IncrementalSplitAssigner.java` lines 389-414: `maxRetries = 3`, backoff 
`Thread.sleep(300L * attempt)` (300ms then 600ms), wrapped `SeaTunnelException` 
on final failure after `LOG.error`.\n\n- **F3** \u2014 
`MysqlCDCStopModeSpecificIT.runLatestStopStartupMode` (lines 340-455): 2000-row 
bulk for `initial` (line 355); readiness gate = await `queryVarcharById(1) == 
\"bulk\"` (lines 406-412); defensive assertion 
`Assertions.assertNull(queryVarcharById(2000), \"snapshot finished too early: 
last-chunk row already in sink; increase the initial bulk row count\")` (lines 
419-423), with a comment (lines 413-418) explaining it fails loudly instead of 
letting a post-UPDATE assertion failure masquerade as data loss.\
 n\n- **F4/F7/F8** \u2014 `docs/en/connectors/source/MySQL-CDC.md`: `stop.mode` 
table row line 203, explanation + worked example at lines 543-559; 
`docs/zh/connectors/source/MySQL-CDC.md`: table row line 202, explanation + 
example at lines 535-551. The PR description's docs checklist item is already 
ticked (`- [x] Docs updated`).\n


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