Proposed patch attached: prune-rep-cache-1.patch
--
- Julian
Let "svnadmin recover" prune the FSFS rep-cache even if it's not being used.
Part of issue #4077 "FSFS recover should prune unborn revisions from
rep-cache.db".
This was included as r1213716 in the original fix for issue #4077, first
released in Subversion 1.7.3, but was reverted in r1367674 (issue #4214)
and so omitted from Subversion 1.8 and later series of releases.
* subversion/libsvn_fs_fs/recovery.c
(recover_body): Prune the rep-cache no matter whether it's in use.
--This line, and those below, will be ignored--
Index: subversion/libsvn_fs_fs/recovery.c
===================================================================
--- subversion/libsvn_fs_fs/recovery.c (revision 1837286)
+++ subversion/libsvn_fs_fs/recovery.c (working copy)
@@ -468,15 +468,15 @@ recover_body(void *baton, apr_pool_t *po
_("Revision %ld has a non-file where its "
"revprops file should be"),
max_rev);
}
/* Prune younger-than-(newfound-youngest) revisions from the rep
- cache if sharing is enabled taking care not to create the cache
- if it does not exist. */
- if (ffd->rep_sharing_allowed)
+ cache, no matter whether sharing is currently enabled, taking care
+ not to create the cache if it does not exist. */
+ if (ffd->format >= SVN_FS_FS__MIN_REP_SHARING_FORMAT)
{
svn_boolean_t rep_cache_exists;
SVN_ERR(svn_fs_fs__exists_rep_cache(&rep_cache_exists, fs, pool));
if (rep_cache_exists)
SVN_ERR(svn_fs_fs__del_rep_reference(fs, max_rev, pool));