kafka-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dong Lin (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (KAFKA-4841) NetworkClient should only consider a connection to be fail after attempt to connect
Date Sun, 05 Mar 2017 10:29:32 GMT

     [ https://issues.apache.org/jira/browse/KAFKA-4841?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Dong Lin updated KAFKA-4841:
----------------------------
    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.
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.

> NetworkClient should only consider a connection to be fail after attempt to connect
> -----------------------------------------------------------------------------------
>
>                 Key: KAFKA-4841
>                 URL: https://issues.apache.org/jira/browse/KAFKA-4841
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Dong Lin
>            Assignee: Dong Lin
>
> 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.
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message