Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-2703

KafkaIO: watermark outside the bounds of BoundedWindow

Details

    • Bug
    • Status: Resolved
    • P2
    • Resolution: Fixed
    • None
    • 2.1.0
    • io-java-kafka
    • None

    Description

      KafkaIO appears to use an incorrect lower bound for it's initial watermark with respect to BoundedWindow.TIMESTAMP_MIN_VALUE.

      KafkaIO's initial watermark:
      new Instant(Long.MIN_VALUE) -> -9223372036854775808

      BoundedWindow.TIMESTAMP_MIN_VALUE:
      new Instant(TimeUnit.MICROSECONDS.toMillis(Long.MIN_VALUE)) -> -9223372036854775

      The difference is that the last three digits have been truncated due to the micro to millis conversion.

      This difference can cause errors in runners that assert that the input watermark can never regress as KafkaIO gives a value below the lower bound when no messages have been received yet. For consistency it would probably be best for it to use BoundedWindow.TIMESTAMP_MIN_VALUE.

      Attachments

        Issue Links

          Activity

            People

              rangadi Raghu Angadi
              cpettitt-linkedin Chris Pettitt
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: