masteryhx commented on code in PR #19679:
URL: https://github.com/apache/flink/pull/19679#discussion_r920730839
##########
flink-state-backends/flink-statebackend-changelog/src/main/java/org/apache/flink/state/changelog/ChangelogKeyedStateBackend.java:
##########
@@ -565,18 +568,44 @@ public <N, SV, SEV, S extends State, IS extends S> IS
createInternalState(
StateSnapshotTransformer.StateSnapshotTransformFactory<SEV>
snapshotTransformFactory)
throws Exception {
+ ChangelogState changelogState =
+ changelogStateFactory.getExistingState(
+ stateDesc.getName(), BackendStateType.KEY_VALUE);
+ if (changelogState == null) {
Review Comment:
I think it should also work even if the createInternalState is called
firstly because it will trigger the migration normally.
In this case, the upgrade method will be called when user access.
--
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]