AHeise commented on a change in pull request #16221:
URL: https://github.com/apache/flink/pull/16221#discussion_r656015404



##########
File path: 
flink-core/src/main/java/org/apache/flink/api/common/eventtime/CombinedWatermarkStatus.java
##########
@@ -66,25 +66,25 @@ public void add(PartialWatermark element) {
     public boolean updateCombinedWatermark() {
         long minimumOverAllOutputs = Long.MAX_VALUE;
 
-        boolean hasOutputs = false;
+        // if we don't have any outputs minimumOverAllOutputs is not valid, 
it's still
+        // at its initial Long.MAX_VALUE state and we must not emit that
+        if (partialWatermarks.isEmpty()) {
+            this.idle = true;

Review comment:
       `this.idle = combinedWatermark > Long.MIN_VALUE`

##########
File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/AbstractStreamOperator.java
##########
@@ -652,11 +652,11 @@ private void processStreamStatus(StreamStatus 
streamStatus, int index) throws Ex
         }
     }
 
-    public final void processStreamStatus1(StreamStatus streamStatus) throws 
Exception {
+    public void processStreamStatus1(StreamStatus streamStatus) throws 
Exception {
         processStreamStatus(streamStatus, 0);
     }
 
-    public final void processStreamStatus2(StreamStatus streamStatus) throws 
Exception {
+    public void processStreamStatus2(StreamStatus streamStatus) throws 
Exception {

Review comment:
       Are these changes still needed?

##########
File path: 
flink-core/src/main/java/org/apache/flink/api/common/eventtime/CombinedWatermarkStatus.java
##########
@@ -45,7 +45,7 @@ public long getCombinedWatermark() {
     }
 
     public boolean isIdle() {
-        return idle;
+        return (!partialWatermarks.isEmpty() || combinedWatermark > 
Long.MIN_VALUE) && idle;

Review comment:
       Couldn't we move the additional checks to `updateCombinedWatermark` to 
your newly added block? See suggestion below.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to