pnowojski commented on a change in pull request #16582:
URL: https://github.com/apache/flink/pull/16582#discussion_r680673722



##########
File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamOperatorWrapper.java
##########
@@ -100,6 +102,16 @@ public void notifyCheckpointComplete(long checkpointId) 
throws Exception {
         }
     }
 
+    public void notifyCheckpointSubsumed(long checkpointId) throws Exception {
+        if (!closed) {
+            if (wrapped instanceof AbstractStreamOperator) {
+                ((AbstractStreamOperator<?>) 
wrapped).notifyCheckpointSubsumed(checkpointId);
+            } else if (wrapped instanceof AbstractStreamOperatorV2) {
+                ((AbstractStreamOperatorV2<?>) 
wrapped).notifyCheckpointSubsumed(checkpointId);
+            }

Review comment:
       You are still adding this method to the public API 
(`AbstractStreamOperator/V2`). What were the drawbacks of @rkhachatryan 's 
suggestion of calling `stateBackend.notifyCheckpointSubsumed()` somewhere 
directly from the `StreamTask`/`OperatorChain`/`StreamOperatorWrapper`, 
bypassing operators all-together?
   
   It's less consistent, but we could use `getKeyedStateBackend()` here as 
@rkhachatryan suggested, right? Or what is wrong with this approach?




-- 
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]


Reply via email to