[
https://issues.apache.org/jira/browse/KAFKA-671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13558969#comment-13558969
]
Neha Narkhede commented on KAFKA-671:
-------------------------------------
Thinking about this a little more, the real problem seems to be that we hang
onto the request object in DelayedProduce until we send out the response. There
are 2 reasons for this -
1. The request latency metrics are part of the request object. These need to be
updated when the response is created.
2. To send out the response, we need the selector key, which is inside the
request object.
To handle delayed produce requests without hanging onto the produce request
data, we will need to -
1. Remove the request object from DelayedProduce
2. Pass in the selector key into DelayedProduce
3. Define the request metrics in a separate object and remove those from the
Request object. Pass in the new RequestMetrics object into DelayedProduce
Since this requires changing the DelayedRequest object as well, it will affect
all requests. My guess is that this refactoring is not that big of a change,
but I could be wrong.
> DelayedProduce requests should not hold full producer request data
> ------------------------------------------------------------------
>
> Key: KAFKA-671
> URL: https://issues.apache.org/jira/browse/KAFKA-671
> Project: Kafka
> Issue Type: Bug
> Affects Versions: 0.8
> Reporter: Joel Koshy
> Assignee: Sriram Subramanian
> Priority: Blocker
> Fix For: 0.8.1
>
> Attachments: outOfMemFix-v1.patch
>
>
> Per summary, this leads to unnecessary memory usage.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira