Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-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 3122F9F18 for ; Sat, 29 Oct 2011 14:45:56 +0000 (UTC) Received: (qmail 46941 invoked by uid 500); 29 Oct 2011 14:45:55 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 46886 invoked by uid 500); 29 Oct 2011 14:45:55 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 46878 invoked by uid 99); 29 Oct 2011 14:45:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 29 Oct 2011 14:45:55 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,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; Sat, 29 Oct 2011 14:45:53 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 38785326DDE for ; Sat, 29 Oct 2011 14:45:32 +0000 (UTC) Date: Sat, 29 Oct 2011 14:45:32 +0000 (UTC) From: "Jan Lehnardt (Commented) (JIRA)" To: dev@couchdb.apache.org Message-ID: <1931402788.36837.1319899532232.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <267156152.87.1318851250809.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (COUCHDB-1309) File descriptor leaks on design document update and view cleanup 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/COUCHDB-1309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13139323#comment-13139323 ] Jan Lehnardt commented on COUCHDB-1309: --------------------------------------- @Paul, sounds like an optimisation to me, would it make sense to get Filipe's patch in and then open a new ticket for your approach? > File descriptor leaks on design document update and view cleanup > ---------------------------------------------------------------- > > Key: COUCHDB-1309 > URL: https://issues.apache.org/jira/browse/COUCHDB-1309 > Project: CouchDB > Issue Type: Bug > Reporter: Filipe Manana > Assignee: Filipe Manana > Attachments: couchdb-1309_12x.patch, couchdb-1309_trunk.patch > > > If we add a design document with views defined in it, open the corresponding view group (by querying one of its views for e.g.), then update the design document in such a way that the view signature changes (changing a view's map function code for e.g), the old view group remains open forever (unless a server restart happens) and keeps it's view file reference counter active forever. > If a view cleanup request comes, the old view file is not deleted since the reference counter is not dropped by the old view group, keeping the file descriptor in use forever. > This leakage is different from what is reported in COUCHDB-1129 but it's somehow related. > The attached patch, simply shutdowns a view group when the design document is updated and the new view signature changes, releasing the old view file descriptor (as soon as no more clients are using the old view). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira