spoorthibasu commented on code in PR #4418: URL: https://github.com/apache/flink-cdc/pull/4418#discussion_r3574713756
########## flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mysql-cdc/src/main/java/org/apache/flink/cdc/connectors/mysql/source/enumerator/MySqlSourceEnumerator.java: ########## Review Comment: Agreed, a stale request shouldn't be able to fail the job. I added a guard in `sendBinlogMeta`. Once the metadata has been released, a `BinlogSplitMetaRequestEvent` can only come from a failed reader attempt, since a live reader that assembled the split recovers it from its own checkpointed state and never re-requests. The enumerator now logs and ignores the request instead of rebuilding from the emptied assigner and throwing. I also made the released state survive a restart, reconstructed from the checkpointed fields, so the guard still holds after restore, not only within the run that released. Both cases are tested, `testStaleBinlogMetaRequestAfterReleaseIsIgnored` within the run and `testStaleBinlogMetaRequestAfterLightRestoreIsIgnored` after restore. -- 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]
