[ https://issues.apache.org/jira/browse/KAFKA-7565?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16789868#comment-16789868 ]
ASF GitHub Bot commented on KAFKA-7565: --------------------------------------- jsancio commented on pull request #6427: KAFKA-7565: Better messaging for invalid fetch response URL: https://github.com/apache/kafka/pull/6427 Users have reported that when consumer poll wake up is used, it is possible to receive fetch responses that don't match the copied topic partitions collection for the session when the fetch request was created. This commit improves the error handling here by throwing an IllegalStateException instead of a NullPointerException. And by generating a message for the exception that includes a bit of more information. ### Committer Checklist (excluded from commit message) - [ ] Verify design and implementation - [ ] Verify test coverage and CI build status - [ ] Verify documentation (including upgrade notes) ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > NPE in KafkaConsumer > -------------------- > > Key: KAFKA-7565 > URL: https://issues.apache.org/jira/browse/KAFKA-7565 > Project: Kafka > Issue Type: Bug > Components: clients > Affects Versions: 1.1.1 > Reporter: Alexey Vakhrenev > Assignee: Jose Armando Garcia Sancio > Priority: Critical > > The stacktrace is > {noformat} > java.lang.NullPointerException > at > org.apache.kafka.clients.consumer.internals.Fetcher$1.onSuccess(Fetcher.java:221) > at > org.apache.kafka.clients.consumer.internals.Fetcher$1.onSuccess(Fetcher.java:202) > at > org.apache.kafka.clients.consumer.internals.RequestFuture.fireSuccess(RequestFuture.java:167) > at > org.apache.kafka.clients.consumer.internals.RequestFuture.complete(RequestFuture.java:127) > at > org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient$RequestFutureCompletionHandler.fireCompletion(ConsumerNetworkClient.java:563) > at > org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.firePendingCompletedRequests(ConsumerNetworkClient.java:390) > at > org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:244) > at > org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:233) > at > org.apache.kafka.clients.consumer.KafkaConsumer.pollOnce(KafkaConsumer.java:1171) > at > org.apache.kafka.clients.consumer.KafkaConsumer.poll(KafkaConsumer.java:1115) > {noformat} > Couldn't find minimal reproducer, but it happens quite often in our system. > We use {{pause()}} and {{wakeup()}} methods quite extensively, maybe it is > somehow related. -- This message was sent by Atlassian JIRA (v7.6.3#76005)