rkhachatryan commented on a change in pull request #15200:
URL: https://github.com/apache/flink/pull/15200#discussion_r647618746



##########
File path: 
flink-state-backends/flink-statebackend-changelog/src/main/java/org/apache/flink/state/changelog/ChangelogReducingState.java
##########
@@ -65,16 +72,24 @@ public V get() throws Exception {
     @Override
     public void add(V value) throws Exception {
         delegatedState.add(value);
+        changeLogger.valueUpdated(delegatedState.get(), getCurrentNamespace());

Review comment:
       As discussed offline:
   1. in general the order does not matter
   2. in this case, it does matter: an updated state value is logged
   3. so delegated state should be updated first and changelog - second; this 
should be done in all places for consistency as well as efficiency (delegated 
state update fails faster as it's usually local)
   4. in case of any failure there will be no inconsistencies as state updates 
and snapshots are done by the same (Task) thread
   
   I'll use the same order in all places.




-- 
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:
[email protected]


Reply via email to