Closed bobtiernay-okta closed 3 years ago
Hello. I agree we could bucket the error handling for both exceptions. However in this case the TimeoutException
duration is higher than the ReadTimeoutException
. The ReadTimeoutException
would fire first, and be subsequently passed into the handleError
method (once current record batch is consumed). The TimeoutException
is logged and discarded, this is suggested by the [WARN] "Error already queued. Ignoring subsequent exception."
Therefore yes we can fix this, however based on the logs provided it would not make any functional difference.
Thanks for the insight. I think it's generally a good idea if that could change in the future or isn't true 100% of the time (e.g. thread scheduling delay, context switching etc.).
Addressed in https://github.com/awslabs/amazon-kinesis-connector-flink/pull/28 and will be included in 2.0.3
I wanted to confirm that the following code:
Shouldn't be checking for
cause instanceof TimeoutException
sinceReadTimeoutException
is a refinement ofTimeoutException
and in practice the following is observed:And the code comment of:
seems to suggest that
ReadTimeout
would fall into this category as well.