yunfengzhou-hub commented on code in PR #25503: URL: https://github.com/apache/flink/pull/25503#discussion_r1798675305
########## flink-runtime/src/main/java/org/apache/flink/runtime/asyncprocessing/operators/AbstractAsyncStateStreamOperator.java: ########## Review Comment: Shall we add some tests to cover the changes introduced in this PR? ########## flink-runtime/src/main/java/org/apache/flink/runtime/asyncprocessing/operators/AbstractAsyncStateStreamOperator.java: ########## @@ -324,6 +327,23 @@ public Object getCurrentKey() { return currentProcessingContext.getKey(); } + // ------------------------------------------------------------------------ + // Metrics + // ------------------------------------------------------------------------ + + protected void reportOrForwardLatencyMarker(LatencyMarker marker) { Review Comment: nit: Add `@Override`. Same for `processRecordAttributes`. ########## flink-runtime/src/main/java/org/apache/flink/runtime/asyncprocessing/operators/AbstractAsyncStateStreamOperator.java: ########## @@ -345,6 +365,56 @@ public void processWatermarkStatus(WatermarkStatus watermarkStatus) throws Excep () -> super.processWatermarkStatus(watermarkStatus)); } + @Override + protected void processWatermarkStatus(WatermarkStatus watermarkStatus, int index) + throws Exception { + if (!isAsyncStateProcessingEnabled()) { + super.processWatermarkStatus(watermarkStatus, index); + return; + } + asyncExecutionController.processNonRecord( + () -> { + boolean wasIdle = combinedWatermark.isIdle(); + if (combinedWatermark.updateStatus(index - 1, watermarkStatus.isIdle())) { Review Comment: Should it be `index`, instead of `index - 1`? And can we directly use `() -> super.processWatermarkStatus(...)` here? -- 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