You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "morozov (via GitHub)" <gi...@apache.org> on 2025/06/21 00:50:48 UTC
[PR] FLINK-37979: Remove obsolete MySQL CDC snapshot split assigner code [flink-cdc]
morozov opened a new pull request, #4048:
URL: https://github.com/apache/flink-cdc/pull/4048
There is a redundant condition and a misleading comment in `MySqlSnapshotSplitAssigner#captureNewlyAddedTables()` that complicate understanding of the code: https://github.com/apache/flink-cdc/blob/164671558ad41751d8c250b37f3341afecbba413/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mysql-cdc/src/main/java/org/apache/flink/cdc/connectors/mysql/source/assigners/MySqlSnapshotSplitAssigner.java#L280-L285
By the time when the above condition is being evaluated, an identical condition has been already evaluated above: https://github.com/apache/flink-cdc/blob/164671558ad41751d8c250b37f3341afecbba413/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mysql-cdc/src/main/java/org/apache/flink/cdc/connectors/mysql/source/assigners/MySqlSnapshotSplitAssigner.java#L226-L228
Therefore, the second evaluation will always result in `true` and thus is redundant.
### Code Change History
Prior to https://github.com/apache/flink-cdc/pull/3519, table discovery would happen in any assigner status, so the condition in the end of the method made sense. Together with adding this condition in the beginning of the method, https://github.com/apache/flink-cdc/pull/3519 should have removed it from the end.
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-37979] Remove obsolete MySQL CDC snapshot split assigner code [flink-cdc]
Posted by "lvyanquan (via GitHub)" <gi...@apache.org>.
lvyanquan merged PR #4048:
URL: https://github.com/apache/flink-cdc/pull/4048
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org