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

NRT Reader close can wipe index it doesn't own

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 4.7.1, 4.8, 6.0
    • 4.7.2, 4.8, 6.0
    • core/index
    • None
    • New

    Description

      Today NRT Readers try to clean up unused files via their IW reference when they are closed. Yet, if the index writer is already closed another index could have been created on the same directory which can create the same files as the IW before. For the NRT Reader those files are not referenced and it will simply wipe them away. If you use this in a replication scenario where directories are reused this can simply wipe your index away or in combination with the FSync issue LUCENE-5570 create 0-byte files. I have a test that reproduces this issue

      Attachments

        1. LUCENE-5574.patch
          4 kB
          Simon Willnauer
        2. LUCENE-5574.patch
          22 kB
          Michael McCandless
        3. LUCENE-5574.patch
          34 kB
          Michael McCandless
        4. LUCENE-5574.patch
          7 kB
          Michael McCandless

        Issue Links

          Activity

            People

              Unassigned Unassigned
              simonw Simon Willnauer
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Slack

                  Issue deployment