[ https://issues.apache.org/jira/browse/LUCENE-767?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12463335 ]
Michael McCandless commented on LUCENE-767: ------------------------------------------- Ooh that's great! I think your logic is correct. But I do see one unit test failing when I make that change locally (testIndexAndMerge in src/test/org/apache/lucene/index/TestDoc.java). Actually, this unit test only fails with my last commit (yesterday) for LUCENE-140 , because I made the checking for "docs out of order" more strict (catch a previously missing boundary case), and this test seems to hit that boundary case. However, that test is buggy because it manually creates SegmentInfos with an incorrect docCount. So I will fix the test, and commit your solution above. Thanks! > maxDoc should be explicitly stored in the index, not derived from file length > ----------------------------------------------------------------------------- > > Key: LUCENE-767 > URL: https://issues.apache.org/jira/browse/LUCENE-767 > Project: Lucene - Java > Issue Type: Improvement > Affects Versions: 1.9, 2.0.0, 2.0.1, 2.1 > Reporter: Michael McCandless > Assigned To: Michael McCandless > Priority: Minor > > This is a spinoff of LUCENE-140 > In general we should rely on "as little as possible" from the file system. > Right now, maxDoc is derived by checking the file length of the FieldsReader > index file (.fdx) which makes me nervous. I think we should explicitly store > it instead. > Note that there are no known cases where this is actually causing a problem. > There was some speculation in the discussion of LUCENE-140 that it could be > one of the possible, but in digging / discussion there were no specifically > relevant JVM bugs found (yet!). So this would be a defensive fix at this > point. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa - 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]