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

Directory.deleteFile should "own" retrying deletions on Windows

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      Rob's idea:

      Today, we have hairy logic in IndexFileDeleter to deal with Windows file systems that cannot delete still open files.

      And with LUCENE-6829, where OfflineSorter now must deal with the situation too ... I worked around it by fixing all tests to disable the virus checker.

      I think it makes more sense to push this "platform specific problem" lower in the stack, into Directory? I.e., its deleteFile method would catch the access denied, and then retry the deletion later. Then we could re-enable virus checker on all these tests, simplify IndexFileDeleter, etc.

      Maybe in the future we could further push this down, into WindowsDirectory, and fix FSDirectory.open to return WindowsDirectory on windows ...

        Attachments

        1. LUCENE-6835.patch
          46 kB
          Michael McCandless
        2. LUCENE-6835.patch
          229 kB
          Michael McCandless

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                mikemccand Michael McCandless
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: