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

fsfs file-hinting fails when reading a rep from the transaction that is commiting rev = SHARD_SIZE

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • trunk
    • 1.8.0
    • libsvn_fs_fs
    • None

    Description

      svnlook and svnauthz reading a file from a transaction will fail when the transaction is commiting the 
      revision equal to the repositories shard size with this error:
      svnauthz: E070014: Can't read file '/home/danielsh/src/svn/t1/subversion/tests/cmdline/svn-test-
      work/repositories/svnauthz_tests-10/db/txn-protorevs/3-3.rev': End of file found
      
      You can reproduce this by building SVN with SVN_FS_FS_DEFAULT_MAX_FILES_PER_DIR=4 and running 
      the svnauthz_tests.py 10.
      
      The problem is that the current file hinting code does not check that the rev_hint is a valid revnum in 
      create_rep_state_body().  When create_rep_state_body() is called to retrieve the transactions 
      predecessor, it has a rev_hint of -1 (since the previous representation was the transaction).  -1 / SHARD 
      = 0 and (SHARD - 1) / SHARD = 0 so it believes the representation is in the protorev file.
      

      Attachments

        Activity

          People

            breser Ben Reser
            breser Ben Reser
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: