spoorthibasu commented on code in PR #4418:
URL: https://github.com/apache/flink-cdc/pull/4418#discussion_r4016531852


##########
flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mysql-cdc/src/main/java/org/apache/flink/cdc/connectors/mysql/source/config/MySqlSourceConfigFactory.java:
##########


Review Comment:
   `createConfig` now fails fast when both options are enabled, rather than 
silently dropping the release. Test: `testFailFastWhenBothOptionsEnabled`.



##########
flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mysql-cdc/src/main/java/org/apache/flink/cdc/connectors/mysql/source/assigners/MySqlHybridSplitAssigner.java:
##########
@@ -161,20 +194,76 @@ public void addSplits(Collection<MySqlSplit> splits) {
             } else {
                 // we don't store the split, but will re-create binlog split 
later
                 isBinlogSplitAssigned = false;
+                // re-creating the binlog split: the reader must re-assemble 
and re-report
+                // before the snapshot metadata can be released again. Bumping 
the generation
+                // invalidates any assembled event still in flight from the 
failed attempt.
+                binlogSplitMetaAssembled = false;
+                checkpointIdToReleaseMeta = null;
+                binlogAssignmentGeneration++;

Review Comment:
   The invalidation now runs whenever the binlog reader resets (via 
`onBinlogReaderReset` in `addSplitsBack`), so it also covers the empty add-back 
that happens when the assignment is already checkpointed. Test: 
`testEmptyAddBackFromBinlogReaderInvalidatesStaleAssembledEvent`.



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