[ https://issues.apache.org/jira/browse/LUCENE-4876?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13720512#comment-13720512 ]
Shai Erera commented on LUCENE-4876: ------------------------------------ This is currently impossible because of SetOnce. If you try to share the same IWC between two writers, MP will throw an exception that its IW cannot be set again. I think we're pretty safe. I'm more bothered by having confusing APIs -- take a look at TestSDP (also SearcherAndTaxoRevision!): you create an IWC, want to get a handle to its IndexDelPolicy, yet you cannot do that until after IW has been created and you need to obtain it from its config. Given that most apps probably manage only one IW, and that creating IWC is not heavy, such that you gain anything by reusing it, I think it's ok that IW won't privately clone it? > 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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org