Return-Path: Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: (qmail 50639 invoked from network); 30 Apr 2010 09:31:23 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 30 Apr 2010 09:31:23 -0000 Received: (qmail 5333 invoked by uid 500); 30 Apr 2010 09:31:22 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 4945 invoked by uid 500); 30 Apr 2010 09:31:19 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 4816 invoked by uid 99); 30 Apr 2010 09:31:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Apr 2010 09:31:18 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Apr 2010 09:31:16 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o3U9UsPB019735 for ; Fri, 30 Apr 2010 09:30:54 GMT Message-ID: <26311832.29771272619854776.JavaMail.jira@thor> Date: Fri, 30 Apr 2010 05:30:54 -0400 (EDT) From: "Michael McCandless (JIRA)" To: dev@lucene.apache.org Subject: [jira] Commented: (LUCENE-2422) don't reuse byte[] in IndexInput/Output for read/writeString In-Reply-To: <21560193.15481272571317545.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LUCENE-2422?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12862606#action_12862606 ] Michael McCandless commented on LUCENE-2422: -------------------------------------------- bq. Mike - this patch is against an old revision? Yes, sorry, the patch applies to 2.9.x. I think we should fix it in 2.9.x (and all branches after -- 3.0, trunk). In trunk these reused byte[] have been moved to DataInput/Output. > don't reuse byte[] in IndexInput/Output for read/writeString > ------------------------------------------------------------ > > Key: LUCENE-2422 > URL: https://issues.apache.org/jira/browse/LUCENE-2422 > Project: Lucene - Java > Issue Type: Bug > Reporter: Michael McCandless > Assignee: Michael McCandless > Fix For: 2.9.3, 3.0.2, 3.1, 4.0.0 > > Attachments: LUCENE-2422.patch > > > IndexInput now holds a private "byte[] bytes", which it re-uses for reading strings. Likewise, IndexOutput holds a UTF8Result (which holds "byte[] bytes"), re-used for writing strings. > These are both dangerous, since on reading or writing immense strings, we never free this storage. > We don't use read/writeString in very perf sensitive parts of the code, so, I think we should not reuse the byte[] at all. > I think this is likely the cause of the recent "IndexWriter and memory usage" thread, started by Ross Woolf on java-user@. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org