[
https://issues.apache.org/jira/browse/LUCENE-4876?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13720656#comment-13720656
]
Shai Erera commented on LUCENE-4876:
------------------------------------
The purpose behind IWC was to centralize all IW setters and ctors into one
config object. This is not only about IW being a member of MP or not. There are
other settings which you many not want to share with other IWs. I think we
should have a SetOnce(IndexWriter) (or AtomicBoolean isUsed) members on IWC
which IW will set in the ctor. That will prevent sharing IWC with anything
else. It's a fast enough detection. I think I'll do that. Let's also remember
that most likely apps are NOT sharing IWC, or reusing one. And those that need
to create multiple instances, should have no problem creating new instances of
IWC (even without calling clone).
As for making the rest of the classes stateless ... it may work for MP, but IDP
such as Snapshot maintains state. What will you do then?
We should go for the simplest solution. I'll try to make the changes to IWC so
that it's not share-able.
> IndexWriterConfig.clone should clone the MergeScheduler
> -------------------------------------------------------
>
> Key: LUCENE-4876
> URL: https://issues.apache.org/jira/browse/LUCENE-4876
> Project: Lucene - Core
> Issue Type: Bug
> Reporter: Adrien Grand
> Assignee: Adrien Grand
> Fix For: 4.3
>
> Attachments: LUCENE-4876.patch, LUCENE-4876.patch, LUCENE-4876.patch
>
>
> ConcurrentMergeScheduler has a List<MergeThread> member to track the running
> merging threads, so IndexWriterConfig.clone should clone the merge scheduler
> so that both IndexWriterConfig instances are independant.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]