rkhachatryan commented on code in PR #19679:
URL: https://github.com/apache/flink/pull/19679#discussion_r925952150
##########
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) {
+ InternalKvState<K, N, SV> state =
+ keyedStateBackend.createInternalState(
+ namespaceSerializer, stateDesc,
snapshotTransformFactory);
+
+ changelogState =
+ changelogStateFactory.create(
+ stateDesc,
+ state,
+ getKvStateChangeLogger(state, stateDesc,
snapshotTransformFactory),
+ keyedStateBackend /* pass the nested backend as
key context so that it get key updates on recovery*/);
+ } else {
+ InternalKvState<K, N, SV> state =
+ keyedStateBackend.upgradeKeyedState(
+ namespaceSerializer, stateDesc,
snapshotTransformFactory);
+ changelogState.setDelegatedState(state);
Review Comment:
I couldn't find this update and still see `final` field in `ChangelogState`s:
```
private final StateChangeLogger<T, Void> logger;```
--
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]