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

Uwe Schindler commented on LUCENE-5173:
---------------------------------------

I agree with both. My complaint was the following:
The assert was not correct, as asserts should only be used for real assertions 
withing the same class. For this special check, there is something outside of 
SegmentMerger that could maybe insert empty readers into the merge queue, so 
those should be thrown away while merging or when sergmentmerger initializes 
(so move to ctor is a good idea). I am thinking about crazy stuff like a merge 
policy that wraps with a FilterAtomicReader to filter while merging (like 
IndexSorter) - which is possible with the current API.

So the segments should be removed on creating the SegmentMerger when all 
readers to merge are already in the List<AtomicReader>.

In the IndexWriter#addIndexes we may then just need the top-level check to not 
even start a merge.
                
> Add checkindex piece of LUCENE-5116
> -----------------------------------
>
>                 Key: LUCENE-5173
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5173
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Robert Muir
>         Attachments: LUCENE-5173.patch
>
>
> LUCENE-5116 fixes addIndexes(Reader) to never write a 0-document segment (in 
> the case you merge in empty or all-deleted stuff).
> I considered it just an inconsistency, but it could cause confusing 
> exceptions to real users too if there was a "regression" here. (see solr 
> users list:Split Shard Error - maxValue must be non-negative). 

--
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]

Reply via email to