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

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

          Issue Links

            Activity

              People

              • Assignee:
                thetaphi Uwe Schindler
                Reporter:
                markrmiller@gmail.com Mark Miller
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: