Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-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 A057146B5 for ; Wed, 25 May 2011 17:54:32 +0000 (UTC) Received: (qmail 59156 invoked by uid 500); 25 May 2011 17:54:31 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 59066 invoked by uid 500); 25 May 2011 17:54:31 -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 58986 invoked by uid 99); 25 May 2011 17:54:31 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 May 2011 17:54:31 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 May 2011 17:54:28 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id AA686DEB95 for ; Wed, 25 May 2011 17:53:47 +0000 (UTC) Date: Wed, 25 May 2011 17:53:47 +0000 (UTC) From: "Shai Erera (JIRA)" To: dev@lucene.apache.org Message-ID: <516739593.42859.1306346027694.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <648206168.42245.1306330247645.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (LUCENE-3144) FreqProxTermsWriter leaks file handles if exceptions are thrown during flush() 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-3144?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Shai Erera updated LUCENE-3144: ------------------------------- Component/s: (was: general/test) core/index Description: FreqProxTermsWriter leaks open file handles if exceptions are thrown during flush. Code needs to be protected by try-finally clauses. (was: MockIndexOutputWrapper checks in various places dir.maybeThrowDeterminsticException(). If an exception is actually thrown, the IndexOutput is not closed, and therefore file handles remain open which prevent cleaning up directories on Windows (and LTC.afterClass prints nasty stack traces). We should wrap every call with a try-catch -- if an exception is thrown, we should close() the underlying stream. This should be done to backwards too (in 3x).) Priority: Major (was: Minor) Issue Type: Bug (was: Test) Summary: FreqProxTermsWriter leaks file handles if exceptions are thrown during flush() (was: MockIndexOutputWrapper should close() if dir.maybeThrowDeterminsticException() throws an exception) Changed issue title and description. > FreqProxTermsWriter leaks file handles if exceptions are thrown during flush() > ------------------------------------------------------------------------------ > > Key: LUCENE-3144 > URL: https://issues.apache.org/jira/browse/LUCENE-3144 > Project: Lucene - Java > Issue Type: Bug > Components: core/index > Reporter: Shai Erera > Assignee: Shai Erera > Fix For: 3.2, 4.0 > > Attachments: LUCENE-3144.patch, LUCENE-3144.patch > > > FreqProxTermsWriter leaks open file handles if exceptions are thrown during flush. Code needs to be protected by try-finally clauses. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org