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

Avoid sending HEAD requests during update-style processing for files whose content is fetched from the WC pristine store

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • trunk
    • 1.8.0
    • libsvn_ra_serf
    • None

    Description

      When handing update-style REPORT responses, libsvn_ra_serf generates for each
      file a pair of pipelined follow-up requests: a PROPFIND (for properties) and a
      GET (for file contents).  The order of these requests matters -- that is, the
      code expects the PROPFIND results to have been processed before trying to deal
      with the file's content.
      
      I recently added logic to libsvn_ra_serf to consult the working copy pristine
      store for file contents whose SHA1 checksum matches that of files about to
      fetched from the network (via GET requests) so we can, you know, avoid
      transmitting that content again.  Unfortunately, the only way I could find to
      preserve the required ordering of properties-then-content was to tie the content
      handling to the Serf pipelined request logic (as it was beforehand) but using a
      request that doesn't actually pull down the file's content.  I used a HEAD
      request to do so.
      
      Ideally, though, there would be a way to stuff some sort of order-preserving
      generic callback mechanism into the Serf pipeline machinery:  "If we've made it
      this far in processing the pipelined request results, go do this non-network-y
      thing..."
      
      With such a thing in place, we could avoid those HEAD requests altogether when
      we know the file's content is already locally available.
      

      Attachments

        1. 1_issue-4179-patch.txt
          7 kB
          C. Michael Pilato

        Activity

          People

            gstein Greg Stein
            cmpilato C. Michael Pilato
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: