yraivo commented on code in PR #13389:
URL: https://github.com/apache/seatunnel/pull/13389#discussion_r4697325251


##########
seatunnel-connectors-v2/connector-cdc/connector-cdc-base/src/main/java/org/apache/seatunnel/connectors/cdc/base/source/enumerator/SnapshotSplitAssigner.java:
##########
@@ -227,9 +227,11 @@ public void onCompletedSplits(List<SnapshotSplitWatermark> 
completedSplitWaterma
 
     @Override
     public void addSplits(Collection<SourceSplitBase> splits) {
+        boolean restoredCompletedSplit = false;

Review Comment:
   I can remove the `restoredCompletedSplit` flag and extract a shared 
completion check for `onCompletedSplits` and `addSplits` (run once after the 
loop). Would that address your concern, or did you also mean 
`restoreCompletedSnapshotSplit`?
   
   (I didn't call `onCompletedSplits` directly inside the loop because restore 
uses `putIfAbsent` to keep existing checkpoint watermarks, and the same batch 
may still contain unfinished splits.)



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