lvyanquan commented on code in PR #4418:
URL: https://github.com/apache/flink-cdc/pull/4418#discussion_r4022187178
##########
flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mysql-cdc/src/main/java/org/apache/flink/cdc/connectors/mysql/source/assigners/state/PendingSplitsStateSerializer.java:
##########
@@ -45,8 +45,7 @@
*/
public class PendingSplitsStateSerializer implements
SimpleVersionedSerializer<PendingSplitsState> {
- // TODO: need proper implementation of the new version
- private static final int VERSION = 5;
+ private static final int VERSION = 6;
Review Comment:
This unconditional version bump changes the checkpoint format for every
MySQL source job, even when
`scan.incremental.snapshot.metadata.release.enabled`
is false. As a result, a default-off job cannot roll back to an older
connector after taking a checkpoint
with the new version.
Since this optimization is opt-in, jobs that do not enable it should keep
writing the existing v5 format without the released flag. Could we make the
serializer version and flag serialization conditional on the option, and only
write v6 when metadata release is enabled?
If a checkpoint already contains `snapshotMetaReleased=true`, restoring it
with
the option disabled should fail fast or otherwise continue writing v6, since
downgrading that state to v5 would lose the released-state marker.
--
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]