Uploaded image for project: 'Subversion'
  1. Subversion
  2. SVN-3596

'hotcopy' of fsfs repos may corrupt target rep-cache.db or revprops.db

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • trunk
    • 1.7.0
    • libsvn_fs_fs
    • None

    Description

      (description copied from the attached thread)
      
      fs_fs.c:svn_fs_fs__hotcopy() uses this code to copy revprops.db:
      1597   /* Copy the packed revprop db. */
      1598   if (format >= SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT)
      1599     {
      1600       SVN_ERR(svn_io_dir_file_copy(src_subdir, dst_subdir, PATH_REVPROPS_DB,
      1601                                    pool));
      1602     }
      
      This post <http://thread.gmane.org/gmane.comp.db.sqlite.general/48391/focus=48423> 
      on the sqlite-users mailing list implies that an exclusive lock must be
      used for copying an sqlite db, and that plain copying might result in
      a corrupt database.
      
      As far as I can see, 'hotcopy' doesn't take the steps recommended
      in that (sub)thread to avoid corruption.
      
      Could someone more familiar with sqlite comment on this?  Could
      'hotcopy', as now written, potentially corrupt the revprops db
      (of the hotcopy target)?
      

      http://article.gmane.org/gmane.comp.version-control.subversion.devel/118341

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              danielsh Daniel Shahaf
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: