Return-Path: X-Original-To: apmail-subversion-commits-archive@minotaur.apache.org Delivered-To: apmail-subversion-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 44973E5F for ; Tue, 3 May 2011 13:15:23 +0000 (UTC) Received: (qmail 58749 invoked by uid 500); 3 May 2011 13:15:23 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 58728 invoked by uid 500); 3 May 2011 13:15:23 -0000 Mailing-List: contact commits-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@subversion.apache.org Delivered-To: mailing list commits@subversion.apache.org Received: (qmail 58721 invoked by uid 99); 3 May 2011 13:15:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 May 2011 13:15:23 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 May 2011 13:15:20 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 183D82388A64; Tue, 3 May 2011 13:15:00 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1099044 - /subversion/trunk/subversion/libsvn_ra_serf/commit.c Date: Tue, 03 May 2011 13:15:00 -0000 To: commits@subversion.apache.org From: philip@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110503131500.183D82388A64@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: philip Date: Tue May 3 13:14:59 2011 New Revision: 1099044 URL: http://svn.apache.org/viewvc?rev=1099044&view=rev Log: Commits that affect large numbers of files should work on systems that limit the number of files that can be open simultaneously. * subversion/libsvn_ra_serf/commit.c (apply_textdelta): Don't rely on pool cleanup. (close_file): Explicitly close file. Modified: subversion/trunk/subversion/libsvn_ra_serf/commit.c Modified: subversion/trunk/subversion/libsvn_ra_serf/commit.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/commit.c?rev=1099044&r1=1099043&r2=1099044&view=diff ============================================================================== --- subversion/trunk/subversion/libsvn_ra_serf/commit.c (original) +++ subversion/trunk/subversion/libsvn_ra_serf/commit.c Tue May 3 13:14:59 2011 @@ -1978,10 +1978,14 @@ apply_textdelta(void *file_baton, * writing to a temporary file (ugh). A special svn stream serf bucket * that returns EAGAIN until we receive the done call? But, when * would we run through the serf context? Grr. + * + * ctx->pool is the same for all files in the commit that send a + * textdelta so this file is explicitly closed in close_file to + * avoid too many simultaneously open files. */ SVN_ERR(svn_io_open_unique_file3(&ctx->svndiff, NULL, NULL, - svn_io_file_del_on_pool_cleanup, + svn_io_file_del_on_close, ctx->pool, ctx->pool)); ctx->stream = svn_stream_create(ctx, pool); @@ -2140,6 +2144,9 @@ close_file(void *file_baton, } } + if (ctx->svndiff) + SVN_ERR(svn_io_file_close(ctx->svndiff, pool)); + /* If we had any prop changes, push them via PROPPATCH. */ if (apr_hash_count(ctx->changed_props) || apr_hash_count(ctx->removed_props))