Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-8735

FileAlreadyExistsException after opening old commit

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Lucene Fields:
      New

      Description

      FilterDirectory.getPendingDeletes() does not delegate calls. This in turn means that IndexFileDeleter does not consider those as relevant files.

      When opening an IndexWriter for an older commit, excess files are attempted deleted. If an IndexReader exists using one of the newer commits, the excess files may fail to delete (at least on windows or when using the mocking WindowsFS).

      If then closing and opening the IndexWriter, the information on the pending deletes are gone if a FilterDirectory derivate is used. At the same time, the pending deletes are filtered out of listAll. This leads to a risk of hitting an existing file name, causing a FileAlreadyExistsException.

      This issue likely only exists on windows.

      Will create pull request with fix.

        Attachments

        Issue Links

          Activity

            People

            • Assignee:
              simonw Simon Willnauer
              Reporter:
              henningandersen Henning Andersen

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 40m
                40m

                  Issue deployment