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

Detach downstream classes from IndexWriter

    Details

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

      Description

      IndexWriter today is shared with many classes like BufferedUpdateStream,
      DocumentsWriter and DocumentsWriterPerThread. Some of them even acquire locks
      on the writer instance or assert that the current thread doesn't hold a lock.
      This makes it very difficult to have a manageable threading model.

      This change separates out the IndexWriter from those classes and makes them all
      independent of IW. IW now implements a new interface for DocumentsWriter to communicate
      on failed or successful flushes and tragic events. This allows IW to make it's critical
      methods private and execute all lock critical actions on it's private queue that ensures
      that the IW lock is not held. Follow-up changes will try to detach more code like
      publishing flushed segments to ensure we never call back into IW in an uncontrolled way.

        Attachments

        1. LUCENE-8269.patch
          53 kB
          Simon Willnauer

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: