diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2020-05-31 20:58:28 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2020-05-31 20:58:28 +0000 |
commit | bbee6e0814d5875b85b81f26fd4ca7a28b6f9570 (patch) | |
tree | 726fcf32b39ca8976d7aa51b67c7236509f1bde4 /subversion/libsvn_fs_fs/recovery.c | |
parent | 38cef28c88864beaadac7a7cffdec6da952c3eb2 (diff) |
Notes
Diffstat (limited to 'subversion/libsvn_fs_fs/recovery.c')
-rw-r--r-- | subversion/libsvn_fs_fs/recovery.c | 12 |
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; |