You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/06/16 14:38:12 UTC

[GitHub] [beam] Abacn commented on a diff in pull request #21740: convert windmill min timestamp to beam min timestamp

Abacn commented on code in PR #21740:
URL: https://github.com/apache/beam/pull/21740#discussion_r899158211


##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/WindmillTimeUtils.java:
##########
@@ -45,6 +45,9 @@ public static Instant windmillToHarnessTimestamp(long timestampUs) {
     // Windmill should never send us an unknown timestamp.
     Preconditions.checkArgument(timestampUs != Long.MIN_VALUE);
     Instant result = new Instant(divideAndRoundDown(timestampUs, 1000));
+    if (result.isBefore(BoundedWindow.TIMESTAMP_MIN_VALUE)) {
+      return BoundedWindow.TIMESTAMP_MIN_VALUE;

Review Comment:
   This condition prevented timestamp overflow and broke unit test WindmillTimerInternalsTest.testTimerDataToFromTimer(<timestamp>=BoundedWindow.TIMESTAMP_MIN_VALUE). If this is intended behavior, should adjust the test case.



-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org