rkhachatryan commented on a change in pull request #15420: URL: https://github.com/apache/flink/pull/15420#discussion_r654382931
########## File path: flink-state-backends/flink-statebackend-changelog/src/main/java/org/apache/flink/state/changelog/restore/AggregatingStateChangeApplier.java ########## @@ -0,0 +1,63 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.flink.state.changelog.restore; + +import org.apache.flink.core.memory.DataInputView; +import org.apache.flink.runtime.state.heap.InternalKeyContext; +import org.apache.flink.runtime.state.internal.InternalAggregatingState; +import org.apache.flink.runtime.state.internal.InternalKvState; + +class AggregatingStateChangeApplier<K, N, IN, SV, OUT> extends KvStateStateChangeApplier<K, N> { + private final InternalAggregatingState<K, N, IN, SV, OUT> state; + + protected AggregatingStateChangeApplier( + InternalKeyContext<K> keyContext, InternalAggregatingState<K, N, IN, SV, OUT> state) { + super(keyContext); + this.state = state; + } + + @Override + protected void applyStateUpdate(DataInputView in) throws Exception { + state.updateInternal(state.getValueSerializer().deserialize(in)); + } + + @Override + protected void applyStateAdded(DataInputView in) { + throw new UnsupportedOperationException(); + } + + @Override + protected void applyStateElementChanged(DataInputView in) { + throw new UnsupportedOperationException(); + } + + @Override + protected InternalKvState<K, N, ?> getState() { + return state; + } + + @Override + protected void applyNameSpaceMerge(DataInputView in) { + throw new UnsupportedOperationException(); Review comment: It actually should be implemented in this PR, thanks for pointing out. ########## File path: flink-state-backends/flink-statebackend-changelog/src/main/java/org/apache/flink/state/changelog/ChangelogReducingState.java ########## @@ -65,16 +80,31 @@ public V get() throws Exception { @Override public void add(V value) throws Exception { delegatedState.add(value); + changeLogger.stateUpdated(delegatedState.get(), getCurrentNamespace()); Review comment: You are right (it was changed in #15200 and now in master). -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org