Lucene - Core
  1. Lucene - Core
  2. LUCENE-2249

ParallelMultiSearcher should shut down thread pool on close

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0
    • Fix Version/s: 3.0.3, 3.1, 4.0-ALPHA
    • Component/s: core/search
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      ParallelMultiSearcher does not shut down its internal thread pool on close. As a result, programs that create multiple instances of this class over their lifetime end up "leaking" threads.

      1. LUCENE-2249.patch
        0.7 kB
        Martin Traverso

        Activity

        Hide
        Martin Traverso added a comment -

        Simple fix.

        Show
        Martin Traverso added a comment - Simple fix.
        Hide
        Simon Willnauer added a comment -

        Current implementation of ParallelMultiSearcher uses a cached thread pool with a core size of 0 and a keep alive time of 60 seconds. This will not leak any threads but closing it is a good idea anyway. I will move this to minor and I don't think its a bug either but good that you found it!
        Thanks

        Show
        Simon Willnauer added a comment - Current implementation of ParallelMultiSearcher uses a cached thread pool with a core size of 0 and a keep alive time of 60 seconds. This will not leak any threads but closing it is a good idea anyway. I will move this to minor and I don't think its a bug either but good that you found it! Thanks
        Hide
        Uwe Schindler added a comment -

        I'll commit this soon - Thanks!

        Show
        Uwe Schindler added a comment - I'll commit this soon - Thanks!
        Hide
        Uwe Schindler added a comment -

        Committed revision: 906744

        Thanks Martin!

        Show
        Uwe Schindler added a comment - Committed revision: 906744 Thanks Martin!
        Hide
        Robert Muir added a comment -

        reopening for possible 2.9.4/3.0.3 backport.

        Show
        Robert Muir added a comment - reopening for possible 2.9.4/3.0.3 backport.
        Hide
        Uwe Schindler added a comment -

        2.9 uses no executors, so only 3.0.3

        Show
        Uwe Schindler added a comment - 2.9 uses no executors, so only 3.0.3
        Hide
        Uwe Schindler added a comment -

        This was already backported with LUCENE-2494.

        Show
        Uwe Schindler added a comment - This was already backported with LUCENE-2494 .

          People

          • Assignee:
            Uwe Schindler
            Reporter:
            Martin Traverso
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development