Return-Path: X-Original-To: apmail-kafka-dev-archive@www.apache.org Delivered-To: apmail-kafka-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 272DCE7F7 for ; Mon, 21 Jan 2013 00:00:14 +0000 (UTC) Received: (qmail 6640 invoked by uid 500); 21 Jan 2013 00:00:14 -0000 Delivered-To: apmail-kafka-dev-archive@kafka.apache.org Received: (qmail 6588 invoked by uid 500); 21 Jan 2013 00:00:13 -0000 Mailing-List: contact dev-help@kafka.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@kafka.apache.org Delivered-To: mailing list dev@kafka.apache.org Received: (qmail 6354 invoked by uid 99); 21 Jan 2013 00:00:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Jan 2013 00:00:13 +0000 Date: Mon, 21 Jan 2013 00:00:13 +0000 (UTC) From: "Jun Rao (JIRA)" To: dev@kafka.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (KAFKA-671) DelayedProduce requests should not hold full producer request data MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/KAFKA-671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13558448#comment-13558448 ] Jun Rao commented on KAFKA-671: ------------------------------- Thinking about this a bit more. There is another approach. In KafkaApis.handle(), after the request is handled, we set RequestChannel.Request.requestObj to null. At this point, the response is not sent yet. Currently, requestObj is needed when sending a response is in RequestChannel.Request.updateRequestMetrics() where we need to print requestObj (in trace). What we can do is that in RequestChannel.Request, after requestObj is constructed, get and cache the string value of request (set the string to null if not trace enabled). We also need to cache isFromFollower which is obtained from requestObj. This way, we don't need ProducerRequest.resetData() and we can guarantee that after KafkaApis.handle(), each requestObj can be GC-ed. > 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