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

De-kluge libsvn_ra_dav's fix for issue #797, use clean fix

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • all
    • 0.15
    • src
    • None

    Description

      Issue #797 describes how revisions 2555 and 2562 fixed a nasty bug
      whereby an out-of-date version-url wcprop could lead to corrupt data
      being committed.
      
      Those fixes are just workarounds.  The real solution is to make wcprop
      writing a loggy operation.  This is not ra_dav's responsibility;
      rather, the callback libsvn_wc supplies to ra_dav should not write the
      wcprops to their live area immediately, but defer the write so its
      coordinated with a log operation.  That log operation would be part of
      the same group of operations in which the file's entry committed rev
      is bumped, and its text base updated.
      
      One solution is to have that callback write wcprops to
      .svn/tmp/wcprops/.  Later, svn_wc_process_commited writes out a log
      item (at the same time it writes the entry commited rev and text base
      log items) saying to update the live wcprops based on tmp/wcprops.  If
      the client crashes before that log group is ever written, the tmp
      wcprops will do no harm -- they just get cleaned out like anything
      else as part of "svn cleanup".
      
      See the dev list discussion "The Four Elements of Righteousness" for
      more on this.  The thread started out as Greg's summary of possible
      solutions, before this solution was known, so you should start at
      kfogel's second message in the thread:
      
      From: Karl Fogel <kfogel@newton.ch.collab.net>
      To: Greg Stein <gstein@lyra.org>
      Cc: dev@subversion.tigris.org
      References: <20020717180955.G26382@lyra.org>
      	<85n0spd4a9.fsf@newton.ch.collab.net>
      Date: 18 Jul 2002 00:43:17 -0500
      
      
      Note that Greg Stein has (in that thread) expressed some reservations
      about this solution.  Philip Martin and I both responded by saying
      that the wc library already does some other things this way, and "svn
      cleanup" cleans out unreferenced tmp files; but Philip at least still
      had reservations despite that, and points out that a better solution
      may be available once the new access baton work for issue #749 is done.
      
      I'm not sure what I think is best, frankly :-).  For Alpha, we'll keep
      the kluge in, because there's no point making a big code churn in such
      a sensitive area right before release.  Soon after Alpha, we should
      pick one of the cleaner solutions (either the one described above, or
      the one Philip has in mind using access batons).
      
      Filing this in Beta.
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            kfogel Karl Fogel
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: