From bbee6e0814d5875b85b81f26fd4ca7a28b6f9570 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 31 May 2020 20:58:28 +0000 Subject: Vendor import svn-1.14.0. --- subversion/libsvn_fs_fs/recovery.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'subversion/libsvn_fs_fs/recovery.c') 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; -- cgit v1.2.3