Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
KAFKA-4820 allows new request to be enqueued to unsent by user thread while some other thread does poll(...). This causes problem in the following scenario:
- Thread A calls poll(...) and is blocked on select(...)
- Thread B enqueues a request into unsent of ConsumerNetworkClient for node N
- Thread A calls checkDisconnects(now) -> client.connectionFailed(N)
Because no attempts have been made to connection to node N yet, there is no state for node N and connectionFailed(N) would throw exception. Note that this problem only occurs when one thread is able to enqueue requests while another thread is in the process of `poll(...)`
The solution is to only consider a connection has failed if attempts have been made to connect to this node AND the connection state is DISCONNECTED.
Attachments
Issue Links
- relates to
-
KAFKA-4842 Streams integration tests occasionally fail with connection error
-
- Resolved
-
- links to