Skip to content

awsIteratedList causes a very tight loop on GetRecord when stream is empty #4

@ozataman

Description

@ozataman

If the stream is empty, GetRecordResponse returns an empty list, but a valid starting point for the next request. With a fast connection, this leads to an endless, very high request throughput loop until more data arrive and slow things down. The immediate effect is receiving ThroughputExceeded exceptions with an empty stream.

Not sure what the solution can be, since internals of awsIteratedList is outside of this package's control. The right thing to do may be to remove the IteratedTransaction instance and roll our own iteratedList function that delays by, say, a second if the previous list is empty.

I've already implemented this in our app and can confirm it eliminates the throughput exceptions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions