Lucene - Core
  1. Lucene - Core
  2. LUCENE-5574

NRT Reader close can wipe index it doesn't own

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 4.7.1, 4.8, Trunk
    • Fix Version/s: 4.7.2, 4.8, Trunk
    • Component/s: core/index
    • Labels:
      None
    • Lucene Fields:
      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

      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

            • Assignee:
              Unassigned
              Reporter:
              Simon Willnauer
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development