fredia commented on code in PR #24748:
URL: https://github.com/apache/flink/pull/24748#discussion_r1595172001


##########
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/asyncprocessing/AbstractAsyncStateStreamOperator.java:
##########
@@ -220,6 +222,40 @@ public <K, N> InternalTimerService<N> 
getInternalTimerService(
                 (AsyncExecutionController<K>) asyncExecutionController);
     }
 
+    @Override
+    public void processWatermark(Watermark mark) throws Exception {
+        if (!isAsyncStateProcessingEnabled()) {
+            // If async state processing is disabled, fallback to the super 
class.
+            super.processWatermark(mark);
+            return;
+        }
+        asyncExecutionController
+                .getEpochManager()
+                .onNonRecord(
+                        () -> {
+                            try {
+                                if (timeServiceManager != null) {
+                                    timeServiceManager.advanceWatermark(mark);
+                                }
+                                output.emitWatermark(mark);
+                            } catch (Exception e) {
+                                // todo: error handling
+                            }
+                        });
+    }
+
+    @Override
+    public void processWatermarkStatus(WatermarkStatus watermarkStatus) throws 
Exception {

Review Comment:
   `InternalWatermark` also uses `AbstractStreamOperator#processWatermark`.
   For `LatencyMarker` `EndOfDataMarker` and `RecordAttributes`, I plan to do 
it in FLINK-35031.



-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to