You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Guozhang Wang (JIRA)" <ji...@apache.org> on 2015/06/30 03:49:04 UTC

[jira] [Commented] (KAFKA-2281) org.apache.kafka.clients.producer.internals.ErrorLoggingCallback holds unnecessary byte[] value

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

Guozhang Wang commented on KAFKA-2281:
--------------------------------------

Thanks for the patch. +1 and committed to trunk.

> org.apache.kafka.clients.producer.internals.ErrorLoggingCallback holds unnecessary byte[] value
> -----------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-2281
>                 URL: https://issues.apache.org/jira/browse/KAFKA-2281
>             Project: Kafka
>          Issue Type: Bug
>          Components: producer 
>    Affects Versions: 0.8.2.1
>            Reporter: TAO XIAO
>            Assignee: TAO XIAO
>         Attachments: KAFKA-2281_2015-06-25.patch
>
>
> org.apache.kafka.clients.producer.internals.ErrorLoggingCallback is constructed with byte[] value as one of the input. It holds the reference to the value until it finishes its lifecycle. The value is not used except for logging its size. This behavior causes unnecessary memory consumption.
> The fix is to keep reference to the value size instead of value itself when logAsString is false



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