[ https://issues.apache.org/jira/browse/LUCENE-6299?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael McCandless updated LUCENE-6299: --------------------------------------- Attachment: LUCENE-6299.patch Thanks Rob, here's a new patch merged with yours. I added tests + fixes for the other issues, and discovered a ridiculous (index corruption) bug: on init IndexWriter does not set its pendingNumDocs to the number of docs already in the index. So this check is completely broken and it's trivial to make a corrupt index today! Grrr... I added a test and fixed that. I also added a test for addIndexes(CodecReader[]) too, fixed BaseCompositeReader to throw CorruptIndexException when it's a DirectoryReader, changed the exception to IllegalArgumentException, changed reserveDocs to just take a long and simplified the checking in addIndexes (just calls reserveDocs). Given that this is an index corruption issue I think we should back-port for 4.10.4, but on back-port I would only do the minimal bug fixes here. > IndexWriter's enforcement of 2.1B doc limits is buggy > ----------------------------------------------------- > > Key: LUCENE-6299 > URL: https://issues.apache.org/jira/browse/LUCENE-6299 > Project: Lucene - Core > Issue Type: Bug > Reporter: Michael McCandless > Assignee: Michael McCandless > Fix For: 4.10.4, 5.0, Trunk, 5.1 > > Attachments: LUCENE-6299.patch, LUCENE-6299_addIndexes.patch > > > E.g. if you pass an already > 2.1B docs to either addIndexes, it can fail to > enforce properly. > IW's private reserveDocs should refuse to accept negative values. > IW.deleteAll fails to set the pendingNumDocs to 0. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org