You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/12/01 05:11:00 UTC

[jira] [Commented] (KAFKA-6289) NetworkClient should not return internal failed api version responses from poll

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

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

GitHub user hachikuji opened a pull request:

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

    KAFKA-6289: NetworkClient should not expose failed internal ApiVersions requests

    The NetworkClient internally ApiVersion requests to each broker following connection establishment. If this request happens to fail (perhaps due to an incompatible broker), the NetworkClient includes the response in the result of poll(). Applications will generally not be expecting this response which may lead to failed assertions (or in the case of AdminClient, an obscure log message).
    
    I've added test cases which await the ApiVersion request sent by NetworkClient to be in-flight, and then disconnect the connection and verify that the response is not included from poll().
    
    ### Committer Checklist (excluded from commit message)
    - [ ] Verify design and implementation 
    - [ ] Verify test coverage and CI build status
    - [ ] Verify documentation (including upgrade notes)


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/hachikuji/kafka KAFKA-6289

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/kafka/pull/4280.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #4280
    
----
commit 3c7420b2ab51f8d918037681ed9862f0d2676ba7
Author: Jason Gustafson <ja...@confluent.io>
Date:   2017-12-01T05:03:54Z

    KAFKA-6289: NetworkClient should not expose failed internal ApiVersion requests

----


> NetworkClient should not return internal failed api version responses from poll
> -------------------------------------------------------------------------------
>
>                 Key: KAFKA-6289
>                 URL: https://issues.apache.org/jira/browse/KAFKA-6289
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Jason Gustafson
>            Assignee: Jason Gustafson
>
> In the AdminClient, if the initial ApiVersion request sent to the broker fails, we see the following obscure message:
> {code}
> [2017-11-30 17:18:48,677] ERROR Internal server error on -2: server returned information about unknown correlation ID 0.  requestHeader = {api_key=18,api_version=1,correlation_id=0,client_id=adminclient-3} (org.apache.kafka.clients.admin.KafkaAdminClient)
> {code}
> What's happening is that the response to the internal ApiVersion request which is received in NetworkClient is mistakenly being sent to the upper layer (the admin client in this case). The admin wasn't expecting it, so we see this message. Instead, the request should be handled internally in NetworkClient.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)