aboutsummaryrefslogtreecommitdiffstats
path: root/subversion/libsvn_fs_fs/recovery.c
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2020-05-31 20:58:28 +0000
committerDimitry Andric <dim@FreeBSD.org>2020-05-31 20:58:28 +0000
commitbbee6e0814d5875b85b81f26fd4ca7a28b6f9570 (patch)
tree726fcf32b39ca8976d7aa51b67c7236509f1bde4 /subversion/libsvn_fs_fs/recovery.c
parent38cef28c88864beaadac7a7cffdec6da952c3eb2 (diff)
downloadsrc-vendor/subversion.tar.gz
src-vendor/subversion.zip
Notes
Notes: svn path=/vendor/subversion/dist/; revision=361669 svn path=/vendor/subversion/subversion-1.14.0/; revision=361670; tag=vendor/subversion/subversion-1.14.0
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;