[ 
https://issues.apache.org/jira/browse/LUCENE-1763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738926#action_12738926
 ] 

Shai Erera commented on LUCENE-1763:
------------------------------------

Yes I had to fix CreateIndexTask for that. We can add an empty ctor, but that 
would be a problem, as it will set the writer member to null. That's what I 
originally meant when I suggested to add the new behavior but not use it yet 
and deprecate the other methods and ctors.

Is it a problem for Solr to follow the logic as in CreateIndexTask? I'm not 
asking from the technical perspective - that's obviously not a problem, but 
release-schedule wise? Maybe you can have a "fixpack release" which will be 
compliant w/ the 2.9 back-compat breaks?

> MergePolicy should require an IndexWriter upon construction
> -----------------------------------------------------------
>
>                 Key: LUCENE-1763
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1763
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Index
>            Reporter: Shai Erera
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 2.9
>
>         Attachments: LUCENE-1763.patch
>
>
> MergePolicy does not require an IW upon construction, but requires one to be 
> passed as method arg to various methods. This gives the impression as if a 
> single MP instance can be shared across various IW instances, which is not 
> true for all MPs (if at all). In addition, LogMergePolicy uses the IW 
> instance passed to these methods incosistently, and is currently exposed to 
> potential NPEs.
> This issue will change MP to require an IW instance, however for back-compat 
> reasons the following changes will be made:
> # A new MP ctor w/ IW as arg will be introduced. Additionally, for 
> back-compat a default ctor will also be declared which will assign null to 
> the member IW.
> # Methods that require IW will be deprecated, and new ones will be declared.
> #* For back-compat, the new ones will not be made abstract, but will throw 
> UOE, with a comment that they will become abstract in 3.0.
> # All current MP impls will move to use the member instance.
> # The code which calls MP methods will continue to use the deprecated 
> methods, passing an IW even that it won't be necessary --> this is strictly 
> for back-compat.
> In 3.0, we'll remove the deprecated default ctor and methods, and change the 
> code to not call the IW method variants anymore.
> I hope that I didn't leave anything out. I'm sure I'll find out when I work 
> on the patch :).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-dev-h...@lucene.apache.org

Reply via email to