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

Clean up DWPTPool

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: master (9.0), 8.6
    • Fix Version/s: master (9.0), 8.6
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      DWPTPool currently uses an indirection called ThreadState to hold DWPT instances. This class holds several information that belongs in other places, inherits from ReentrantLock and has a mutable nature. Instead we could pool the DWPT directly and remove other indirections inside DWPTFlushControl if we move some of the ThreadState properties to DWPT directly. The threadpool also has a problem that is grows it's ThreadStates to the number of concurrently indexing threads but never shrinks it if they are reduced. With pooling DWPT directly this limitation could be removed.
      In summary, this component has seen quite some refactoring and requires some cleanups and docs changes in order to stay the test of time.

        Attachments

          Activity

            People

            • Assignee:
              simonw Simon Willnauer
              Reporter:
              simonw Simon Willnauer
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 11h 10m
                11h 10m