fredia commented on code in PR #25773: URL: https://github.com/apache/flink/pull/25773#discussion_r1879258285
########## flink-runtime/src/main/java/org/apache/flink/runtime/asyncprocessing/operators/AbstractAsyncStateStreamOperator.java: ########## @@ -330,7 +332,22 @@ public void processWatermark(Watermark mark) throws Exception { super.processWatermark(mark); return; } - asyncExecutionController.processNonRecord(() -> super.processWatermark(mark)); + asyncExecutionController.processNonRecord( + () -> { + // todo: make async operator deal with interruptible watermark + if (timeServiceManager != null) { + CompletableFuture<Void> future = timeServiceManager.advanceWatermark(mark); + if (asyncExecutionController.isSerialMode()) { + asyncExecutionController.drainInflightRecords(0); + future.get(); + output.emitWatermark(mark); + } else { + future.thenAccept(v -> output.emitWatermark(mark)); + } Review Comment: Nice suggestion, moved the `drain` and `assert future.isDone()` into AEC. -- 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