Skip to content

Resharding the kinesis stream #9

@scattym

Description

@scattym

Resharding the kinesis stream results in a ShardClosedException. Catching this exception is fine, but I think this is resulting in the reader being added to the "dead_readers" list and then we try to reopen it. Then on line 310 of the kinesis_consumer.py, we get the following exception:

    return future.result()
  File "pull-akcl", line 104, in read_stream
    async for shard_reader in consumer.get_shard_readers():
  File "/home/matt/git/async-kinesis-client/src/async_kinesis_client/kinesis_consumer.py", line 310, in get_shard_readers
    **iterator_args
  File "/home/matt/.pyenv/versions/3.7.4/lib/python3.7/site-packages/aiobotocore/client.py", line 105, in _make_api_call
    raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (ValidationException) when calling the GetShardIterator operation: 1 validation error detected: Value '' at 'startingSequenceNumber' failed to satisfy constraint: Member must satisfy regular expression pattern: 0|([1-9]\d{0,128})

Is there a way to mark the reader as closed and not try to reopen it? Apologies if there is an obvious way to do this, I just can't see it at the moment.

I did try to stop the reader with the .stop() but I don't think that behaves as I was hoping.

I am invoking the reader with AT_TIMESTAMP and no dynamodb instance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions