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

Extract ReaderPool from IndexWriter

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 7.4, 8.0
    • Fix Version/s: 7.4, 8.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      ReaderPool plays a central role in the IndexWriter pooling NRT readers and making sure we write buffered deletes and updates to disk. This class used to be a non-static inner class accessing many aspects including locks from the IndexWriter itself. This change moves the class outside of IW and defines it's responsiblity in a clear way with respect to locks etc. Now IndexWriter doesn't need to share ReaderPool anymore and reacts on writes done inside the pool by checkpointing internally. This also removes acquiring the IW lock inside the reader pool which makes reasoning about concurrency difficult.

      This change also add javadocs and dedicated tests for the ReaderPool class.

      /cc Michael McCandless Dawid Weiss

        Attachments

        1. extract_reader_pool.diff
          64 kB
          Simon Willnauer

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: