aboutsummaryrefslogtreecommitdiffstats
path: root/subversion/libsvn_fs_fs/recovery.c
diff options
context:
space:
mode:
Diffstat (limited to 'subversion/libsvn_fs_fs/recovery.c')
-rw-r--r--subversion/libsvn_fs_fs/recovery.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/subversion/libsvn_fs_fs/recovery.c b/subversion/libsvn_fs_fs/recovery.c
index eef06f65942a..09030f4e6f97 100644
--- a/subversion/libsvn_fs_fs/recovery.c
+++ b/subversion/libsvn_fs_fs/recovery.c
@@ -471,9 +471,15 @@ recover_body(void *baton, apr_pool_t *pool)
}
/* 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, taking care not to create the cache if it does not exist.
+
+ We do this whenever rep-cache.db exists, whether it's currently enabled
+ or not, to prevent a data loss that could result from having revisions
+ created after this 'recover' operation referring to rep-cache.db rows
+ that were created before the recover and that point to revisions younger-
+ than-(newfound-youngest).
+ */
+ if (ffd->format >= SVN_FS_FS__MIN_REP_SHARING_FORMAT)
{
svn_boolean_t rep_cache_exists;