You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/12/26 22:37:58 UTC

[jira] [Commented] (KAFKA-3378) Client blocks forever if SocketChannel connects instantly

    [ https://issues.apache.org/jira/browse/KAFKA-3378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15779105#comment-15779105 ] 

ASF GitHub Bot commented on KAFKA-3378:
---------------------------------------

Github user pono closed the pull request at:

    https://github.com/apache/kafka/pull/1083


> Client blocks forever if SocketChannel connects instantly
> ---------------------------------------------------------
>
>                 Key: KAFKA-3378
>                 URL: https://issues.apache.org/jira/browse/KAFKA-3378
>             Project: Kafka
>          Issue Type: Bug
>          Components: clients
>    Affects Versions: 0.9.0.1
>            Reporter: Larkin Lowrey
>            Assignee: Larkin Lowrey
>            Priority: Blocker
>             Fix For: 0.10.0.0
>
>
> Observed that some consumers were blocked in Fetcher.listOffset() when starting many dozens of consumer threads at the same time.
> Selector.connect(...) calls SocketChannel.connect() in non-blocking mode and assumes that false is always returned and that the channel will be in the Selector's readyKeys once the connection is ready for connect completion due to the OP_CONNECT interest op.
> When connect() returns true the channel is fully connected connected and will not be included in readyKeys since only OP_CONNECT is set.
> I implemented a fix which handles the case when connect(...) returns true and verified that I no longer see stuck consumers. A git pull request will be forthcoming.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)