[
https://issues.apache.org/jira/browse/LUCENE-8269?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16448303#comment-16448303
]
ASF subversion and git services commented on LUCENE-8269:
---------------------------------------------------------
Commit 422955eb0d0297ed1f13269eb24e37c4a5c86129 in lucene-solr's branch
refs/heads/branch_7x from [~simonw]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=422955e ]
LUCENE-8269: Detach downstream classes from IndexWriter
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.
> Detach downstream classes from IndexWriter
> ------------------------------------------
>
> Key: LUCENE-8269
> URL: https://issues.apache.org/jira/browse/LUCENE-8269
> Project: Lucene - Core
> Issue Type: Improvement
> Affects Versions: 7.4, master (8.0)
> Reporter: Simon Willnauer
> Priority: Major
> Fix For: 7.4, master (8.0)
>
> Attachments: LUCENE-8269.patch
>
>
> 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.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]