aljoscha commented on a change in pull request #8765: [hotfix][streaming] 
Report correct value of currentProcessingTime in the exception
URL: https://github.com/apache/flink/pull/8765#discussion_r294251141
 
 

 ##########
 File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/windowing/WindowOperator.java
 ##########
 @@ -319,11 +319,14 @@ public void merge(W mergeResult,
                                                                        
"event-time window cannot become earlier than the current watermark " +
                                                                        "by 
merging. Current watermark: " + internalTimerService.currentWatermark() +
                                                                        " 
window: " + mergeResult);
-                                               } else if 
(!windowAssigner.isEventTime() && mergeResult.maxTimestamp() <= 
internalTimerService.currentProcessingTime()) {
-                                                       throw new 
UnsupportedOperationException("The end timestamp of a " +
+                                               } else {
 
 Review comment:
   This introduces an additional call to 
`internalTimerService.currentProcessingTime()`, which does a syscall, if I'm 
not mistaken, for the current time every time the else branch is taken.
   
   We should probably do the `!windowAssigner.isEventTime()` check in the else 
and then retrieve the current processing time within the else block.

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


With regards,
Apache Git Services

Reply via email to