pltbkd commented on code in PR #22291: URL: https://github.com/apache/flink/pull/22291#discussion_r1160398514
########## flink-runtime/src/main/java/org/apache/flink/runtime/source/coordinator/SourceCoordinator.java: ########## @@ -178,9 +178,16 @@ void announceCombinedWatermark() { aggregator.getAggregatedWatermark().getTimestamp()); }); - long maxAllowedWatermark = - globalCombinedWatermark.getTimestamp() - + watermarkAlignmentParams.getMaxAllowedWatermarkDrift(); + long maxAllowedWatermark; + try { + maxAllowedWatermark = Review Comment: You are right, and I suppose `globalCombinedWatermark.getTimestamp() > 0 && Long.MAX_VALUE - globalCombinedWatermark.getTimestamp() < watermarkAlignmentParams.getMaxAllowedWatermarkDrift()` would be fine? I think it better to be clear why and how it is checked. So in fact I would prefer simply adding comments in the try-catch to the bit operation if the simple expression is not enough. -- 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