[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Bug: Problems committing special revisions

From: Tobias Ringström <tobias_at_ringstrom.mine.nu>
Date: 2004-06-22 01:06:14 CEST

Øyvind A. Holm wrote:

>When I now try to commit the change into the repository, svn grows to
>around 730 megabytes in the memory and then dies. (When committing
>r262144 svn left a core dump of 1.619.374.080 bytes and died.) A new svn
>cleanup is necessary. After this commit is done, all commits happens
>normally.
>
I just took a quick look, but the following patch should take care of
the extreme memory usage you've been experiencing.

/Tobias

Index: subversion/libsvn_fs_base/tree.c
===================================================================
--- subversion/libsvn_fs_base/tree.c (revision 10049)
+++ subversion/libsvn_fs_base/tree.c (working copy)
@@ -1666,6 +1666,8 @@
     pred_id = id;
     for (lev = 0; lev < nlevels; lev++)
       {
+ apr_pool_t *subpool;
+
         /* To save overhead, skip the second level (that is, never
            redeltify the node-revision two predecessors back). */
         if (lev == 1)
@@ -1674,14 +1676,16 @@
         /* Note that COUNT is not reset between levels, and neither is
            PREDNODE; we just keep counting from where we were up to
            where we're supposed to get. */
+ subpool = svn_pool_create (pool);
         while (count < (1 << lev))
           {
             struct txn_pred_id_args tpi_args;

+ svn_pool_clear (subpool);
             tpi_args.id = pred_id;
- tpi_args.pool = pool;
+ tpi_args.pool = subpool;
             SVN_ERR (svn_fs_base__retry_txn (fs, txn_body_pred_id,
- &tpi_args, pool));
+ &tpi_args, subpool));
             pred_id = tpi_args.pred_id;

             if (pred_id == NULL)
@@ -1690,6 +1694,7 @@

             count++;
           }
+ svn_pool_destroy (subpool);

         /* Finally, do the deltification. */
         td_args.tgt_id = pred_id;

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Jun 22 01:06:55 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.