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

When reopen returns a new IndexReader, both IndexReaders may now control the lifecycle of the underlying Directory which is managed by reference counting

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.4.1, 2.9
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      Rough summary. Basically, FSDirectory tracks references to FSDirectory and when IndexReader.reopen shares a Directory with a created IndexReader and closeDirectory is true, FSDirectory's ref management will see two decrements for one increment. You can end up getting an AlreadyClosed exception on the Directory when the IndexReader is open.

      I have a test I'll put up. A solution seems fairly straightforward (at least in what needs to be accomplished).

        Attachments

        1. Failing-testcase-LUCENE-1453.patch
          9 kB
          Uwe Schindler
        2. LUCENE-1453.patch
          22 kB
          Uwe Schindler
        3. LUCENE-1453.patch
          21 kB
          Uwe Schindler
        4. LUCENE-1453.patch
          17 kB
          Uwe Schindler
        5. LUCENE-1453.patch
          6 kB
          Michael McCandless
        6. LUCENE-1453.patch
          5 kB
          Michael McCandless
        7. LUCENE-1453.patch
          4 kB
          Mark Miller
        8. LUCENE-1453-fix-TestIndexReader.patch
          3 kB
          Uwe Schindler
        9. LUCENE-1453-with-FSDir-open.patch
          23 kB
          Uwe Schindler

        Issue Links

          Activity

            People

            • Assignee:
              uschindler Uwe Schindler
              Reporter:
              markrmiller@gmail.com Mark Miller

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment