You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Cong Ding (Jira)" <ji...@apache.org> on 2021/07/29 03:39:00 UTC
[jira] [Updated] (KAFKA-13149) Null Pointer Exception when
record==null at produce path
[ https://issues.apache.org/jira/browse/KAFKA-13149?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Cong Ding updated KAFKA-13149:
------------------------------
Priority: Major (was: Blocker)
> Null Pointer Exception when record==null at produce path
> --------------------------------------------------------
>
> Key: KAFKA-13149
> URL: https://issues.apache.org/jira/browse/KAFKA-13149
> Project: Kafka
> Issue Type: Bug
> Components: log
> Reporter: Cong Ding
> Priority: Major
>
> In production, we have seen an exception
> {code:java}
> java.lang.NullPointerException: Cannot invoke "org.apache.kafka.common.record.Record.hasMagic(byte)" because "record" is null{code}
> which is triggered by
> [https://github.com/apache/kafka/blob/bfc57aa4ddcd719fc4a646c2ac09d4979c076455/core/src/main/scala/kafka/log/LogValidator.scala#L191]
> when handling a produce request.
> The reason is that [https://github.com/apache/kafka/blob/bfc57aa4ddcd719fc4a646c2ac09d4979c076455/clients/src/main/java/org/apache/kafka/common/record/DefaultRecord.java#L294-L296] returns record==null, which is possibly caused by a bad client. However, we have no idea about the client in our multi-tenant environment.
> We should let the broker throw an invalid record exception and notify clients.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)