Zakelly commented on code in PR #25792:
URL: https://github.com/apache/flink/pull/25792#discussion_r1883809521


##########
flink-runtime/src/main/java/org/apache/flink/runtime/asyncprocessing/operators/AbstractAsyncStateStreamOperator.java:
##########
@@ -368,10 +385,12 @@ protected void processWatermarkStatus(WatermarkStatus 
watermarkStatus, int index
                     boolean wasIdle = combinedWatermark.isIdle();
                     // index is 0-based
                     if (combinedWatermark.updateStatus(index, 
watermarkStatus.isIdle())) {
-                        super.processWatermark(
-                                new 
Watermark(combinedWatermark.getCombinedWatermark()));
-                    }
-                    if (wasIdle != combinedWatermark.isIdle()) {
+                        doProcessWatermark(

Review Comment:
   @davidradl `if`s are independent, but the execution order is serial. This PR 
must ensure in async context, the possible `processWatermark` and 
`output.emitWatermarkStatus` still executed in order. So if you read the code:
   ```
   if (conditionA) {
     asyncDo(a; then if (conditionB) then b)
   } else if (conditionB) {
     do(b)
   }
   ```



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