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

KafkaIO should handle "latest offset" evenly, and persist it as part of the CheckpointMark.

Details

    • Improvement
    • Status: Resolved
    • P2
    • Resolution: Fixed
    • None
    • 0.3.0-incubating
    • io-java-kafka
    • None

    Description

      Currently, the KafkaIO (when configured to "latest") will check the latest offset on the worker. This means that each worker sees a "different" latest for the time it checks for the partitions assigned to it.
      This also means that if a worker fails before starting to read, and new messages were added in between, they would be missed.

      I think we should consider checking the offsets (could be the same for "earliest") when running initialSplits (that's how Spark does that as well, one call from the driver for all topic-partitions).
      I'd also suggest we persist the latest offset as part of the CheckpointMark so that once latest is set, it is remembered until new messages arrive and it doesn't need to be resolved again (and if there were new messages available they won't be missed upon failure).

      For Spark this is even more important as state is passed in-between micro-batches and sparse partitions may skip messages until a message finally arrives within the read time-frame.

      Attachments

        Activity

          People

            rangadi Raghu Angadi
            amitsela Amit Sela
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: