subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1560723 - /subversion/trunk/subversion/libsvn_fs_fs/hotcopy.c
Date Thu, 23 Jan 2014 16:18:06 GMT
Author: stefan2
Date: Thu Jan 23 16:18:05 2014
New Revision: 1560723

URL: http://svn.apache.org/r1560723
Log:
When hotcopying non-shared repositories, checkpoint the progress after
every revision.  This is not strictly necessary and adds a performance
penalty but improves behavior if we re-run hotcopy after cancelling a
previous one.

* subversion/libsvn_fs_fs/hotcopy.c
  (hotcopy_body): Checkpoint "current" after each rev in nonshared reps
                  and give a detailed rationale.

Modified:
    subversion/trunk/subversion/libsvn_fs_fs/hotcopy.c

Modified: subversion/trunk/subversion/libsvn_fs_fs/hotcopy.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/hotcopy.c?rev=1560723&r1=1560722&r2=1560723&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/hotcopy.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/hotcopy.c Thu Jan 23 16:18:05 2014
@@ -861,8 +861,15 @@ hotcopy_body(void *baton, apr_pool_t *po
                                       rev, max_files_per_dir, FALSE,
                                       iterpool));
 
-      /* After completing a full shard, update 'current'. */
-      if (max_files_per_dir && rev % max_files_per_dir == 0)
+      /* After completing a full shard, update 'current'.  For non-shared
+       * repositories, update after every revision.
+       * 
+       * This "checkpoints" the progress we made so far and prevents us from
+       * starting all over again if the hotcopy process got canceled.  It is
+       * not _necessary_ to update "current" until the very end (see further
+       * below); it's a performance trade-off between different scenarios.
+       */
+      if (!max_files_per_dir || rev % max_files_per_dir == 0)
         SVN_ERR(hotcopy_update_current(&dst_youngest, dst_fs, rev, iterpool));
     }
   svn_pool_destroy(iterpool);



Mime
View raw message