You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by sv...@apache.org on 2015/03/05 20:40:54 UTC
svn commit: r1664463 - in /subversion/branches/1.9.x: ./ STATUS
subversion/libsvn_repos/rev_hunt.c
Author: svn-role
Date: Thu Mar 5 19:40:54 2015
New Revision: 1664463
URL: http://svn.apache.org/r1664463
Log:
Merge the r1664084 group from trunk:
* r1664084, r1664085
Reduce memory footprint of svn_repos_deleted_rev().
Justification:
Unbounded memory usage. Regression since 1.8.x. Simple fix that keeps
memory usage limited in a loop.
Votes:
+1: rhuijben, ivan, stefan2
Modified:
subversion/branches/1.9.x/ (props changed)
subversion/branches/1.9.x/STATUS
subversion/branches/1.9.x/subversion/libsvn_repos/rev_hunt.c
Propchange: subversion/branches/1.9.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Mar 5 19:40:54 2015
@@ -89,4 +89,4 @@
/subversion/branches/verify-at-commit:1462039-1462408
/subversion/branches/verify-keep-going:1439280-1546110
/subversion/branches/wc-collate-path:1402685-1480384
-/subversion/trunk:1660545-1660547,1660549-1662901,1663003,1663697,1663706,1663749
+/subversion/trunk:1660545-1660547,1660549-1662901,1663003,1663697,1663706,1663749,1664084-1664085
Modified: subversion/branches/1.9.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/STATUS?rev=1664463&r1=1664462&r2=1664463&view=diff
==============================================================================
--- subversion/branches/1.9.x/STATUS (original)
+++ subversion/branches/1.9.x/STATUS Thu Mar 5 19:40:54 2015
@@ -141,11 +141,3 @@ Veto-blocked changes:
Approved changes:
=================
-
- * r1664084, r1664085
- Reduce memory footprint of svn_repos_deleted_rev().
- Justification:
- Unbounded memory usage. Regression since 1.8.x. Simple fix that keeps
- memory usage limited in a loop.
- Votes:
- +1: rhuijben, ivan, stefan2
Modified: subversion/branches/1.9.x/subversion/libsvn_repos/rev_hunt.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/libsvn_repos/rev_hunt.c?rev=1664463&r1=1664462&r2=1664463&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/libsvn_repos/rev_hunt.c (original)
+++ subversion/branches/1.9.x/subversion/libsvn_repos/rev_hunt.c Thu Mar 5 19:40:54 2015
@@ -310,9 +310,8 @@ svn_repos_deleted_rev(svn_fs_t *fs,
svn_revnum_t *deleted,
apr_pool_t *pool)
{
- apr_pool_t *subpool;
- svn_fs_root_t *start_root, *root, *copy_root;
- const char *copy_path;
+ apr_pool_t *iterpool;
+ svn_fs_root_t *start_root, *root;
svn_revnum_t mid_rev;
svn_node_kind_t kind;
svn_fs_node_relation_t node_relation;
@@ -379,6 +378,8 @@ svn_repos_deleted_rev(svn_fs_t *fs,
root, path, pool));
if (node_relation != svn_fs_node_unrelated)
{
+ svn_fs_root_t *copy_root;
+ const char *copy_path;
SVN_ERR(svn_fs_closest_copy(©_root, ©_path, root,
path, pool));
if (!copy_root ||
@@ -432,15 +433,15 @@ svn_repos_deleted_rev(svn_fs_t *fs,
*/
mid_rev = (start + end) / 2;
- subpool = svn_pool_create(pool);
+ iterpool = svn_pool_create(pool);
while (1)
{
- svn_pool_clear(subpool);
+ svn_pool_clear(iterpool);
/* Get revision root and node id for mid_rev at that revision. */
- SVN_ERR(svn_fs_revision_root(&root, fs, mid_rev, subpool));
- SVN_ERR(svn_fs_check_path(&kind, root, path, pool));
+ SVN_ERR(svn_fs_revision_root(&root, fs, mid_rev, iterpool));
+ SVN_ERR(svn_fs_check_path(&kind, root, path, iterpool));
if (kind == svn_node_none)
{
/* Case D: Look lower in the range. */
@@ -449,13 +450,15 @@ svn_repos_deleted_rev(svn_fs_t *fs,
}
else
{
+ svn_fs_root_t *copy_root;
+ const char *copy_path;
/* Determine the relationship between the start node
and the current node. */
SVN_ERR(svn_fs_node_relation(&node_relation, start_root, path,
- root, path, pool));
+ root, path, iterpool));
if (node_relation != svn_fs_node_unrelated)
- SVN_ERR(svn_fs_closest_copy(©_root, ©_path, root,
- path, subpool));
+ SVN_ERR(svn_fs_closest_copy(©_root, ©_path, root,
+ path, iterpool));
if (node_relation == svn_fs_node_unrelated ||
(copy_root &&
(svn_fs_revision_root_revision(copy_root) > start)))
@@ -479,7 +482,7 @@ svn_repos_deleted_rev(svn_fs_t *fs,
}
}
- svn_pool_destroy(subpool);
+ svn_pool_destroy(iterpool);
return SVN_NO_ERROR;
}