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.
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.