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

IndexWriter.close(false) does not actually stop background merge threads

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.3
    • 2.3
    • None
    • None
    • New

    Description

      Right now when you close(false), IndexWriter marks any running merges
      as aborted but then does not wait for these merges to finish. This
      can cause problems because those threads still hold files open, so,
      someone might think they can call close(false) and then (say) delete
      all files from that directory, which would fail on Windows.

      Instead, close(false) should notify each running merge that it has
      been aborted, and not return until all running merges are done. Then,
      SegmentMerger should periodically check whether it has been aborted
      and stop if so.

      Attachments

        1. LUCENE-1097.patch
          24 kB
          Michael McCandless

        Activity

          People

            mikemccand Michael McCandless
            mikemccand Michael McCandless
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: