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

Bug in recovering from checkpoints

Details

    • Bug
    • Status: Open
    • P3
    • Resolution: Unresolved
    • None
    • None
    • io-java-kinesis
    • None

    Description

      There is a bug in the Kinesis connector which doesn't allow Beam to read from new shards if restored from an old enough checkpoint.

      When loading from an old checkpoint `ShardReadersPool` will identify that the old shard is closed and only attempts to read from successive shards. However when trying to find successive shards it will only look for shards that were children of the old shard, these shards may not exist if the checkpoint is old enough as expired shards are not returned when listing shards (docs)

      Example 1:

      Checkpoint:

      (Alive)
      Shard 1

      At restoration:

                         (Alive)
                      > Shard 2 \
      (Exp)     /                    \  (Alive)
      Shard 1                        -> Shard 4
                   \   (Alive)      /
                     > Shard 3 /

      In this example the connector will currently work correctly as Shard 2 and 3 will be identified as the successive shards and will continue reading from them.

      Example 2:

      Checkpoint:

      (Alive)
      Shard 1

      At restoration:

                          (Exp)
                      > Shard 2 \
      (Exp)     /                    \  (Alive)
      Shard 1                        -> Shard 4
                   \    (Exp)       /
                     > Shard 3 /

      In this example the connector currently won't work correctly as it wont identify Shard 4 as a successive shard as its not a child of Shard 1 and thus stop reading from the stream when it should start reading from Shard 4.

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            usamj Usamah Jassat
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: