kafka-jira mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "huxihx (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KAFKA-5859) Avoid retaining AbstractRequest in RequestChannel.Request
Date Mon, 11 Sep 2017 07:30:00 GMT

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

huxihx commented on KAFKA-5859:
-------------------------------

[~ijuma] Seems `updateRequestMetrics` in `RequestChannel.Request` still needs the underlying
request object to check if a FETCH request is from follower. 

> Avoid retaining AbstractRequest in RequestChannel.Request
> ---------------------------------------------------------
>
>                 Key: KAFKA-5859
>                 URL: https://issues.apache.org/jira/browse/KAFKA-5859
>             Project: Kafka
>          Issue Type: Improvement
>            Reporter: Ismael Juma
>            Priority: Minor
>              Labels: newbie
>
> We currently store AbstractRequest in RequestChannel.Request.bodyAndSize. RequestChannel.Request
is, in turn, stored in RequestChannel.Response. We keep the latter until the response is sent
to the client.
> However, after KafkaApis.handle, we no longer need AbstractRequest apart from its string
representation for logging. We could potentially replace AbstractRequest with a String representation
(if the relevant logging is enabled). The String representation is generally small while some
AbstractRequest subclasses can be pretty large. The largest one is ProduceRequest and we clear
the underlying ByteBuffer explicitly in KafkaApis.handleProduceRequest. We could potentially
remove that special case if AbstractRequest subclasses were not retained.
> This was originally suggested by [~hachikuji] in the following PR https://github.com/apache/kafka/pull/3801#discussion_r137592277



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

Mime
View raw message