Lucene - Core
  1. Lucene - Core
  2. LUCENE-3798

Potential IndexReader leak in SearcherManager and NRTManager

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Invalid
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: core/search
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      SearcherManager and NRTManager ctors init a new IndexReader and call searcherFactory.newSearcher. The latter can throw IOE,in which case we fail to close the readers. We should wrap the code with a try-finally (success) clause.

      Opening this issue so we don't forget to fix it.

        Activity

        Hide
        Michael McCandless added a comment -

        I think this is fixed with the new getSearcher (static) method? (It decRefs the incoming reader on exception...)

        Show
        Michael McCandless added a comment - I think this is fixed with the new getSearcher (static) method? (It decRefs the incoming reader on exception...)
        Hide
        Shai Erera added a comment -

        Argh, you're right. I didn't 'svn up' before I looked at the code .

        Sorry for the noise.

        Show
        Shai Erera added a comment - Argh, you're right. I didn't 'svn up' before I looked at the code . Sorry for the noise.

          People

          • Assignee:
            Unassigned
            Reporter:
            Shai Erera
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development