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

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.4
    • 2.4.1, 2.9
    • None
    • None
    • 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

              uschindler Uwe Schindler
              markrmiller@gmail.com Mark Miller
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: