mirror of https://github.com/apache/lucene.git
LUCENE-6213: Revert accidental removal of code from readCommit (bad merge)
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1676650 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f59604f885
commit
d49fe2fb6d
|
@ -344,6 +344,11 @@ public final class SegmentInfos implements Cloneable, Iterable<SegmentCommitInfo
|
|||
|
||||
CodecUtil.checkFooter(input);
|
||||
|
||||
// LUCENE-6299: check we are in bounds
|
||||
if (totalDocs > IndexWriter.getActualMaxDocs()) {
|
||||
throw new CorruptIndexException("Too many documents: an index cannot exceed " + IndexWriter.getActualMaxDocs() + " but readers have total maxDoc=" + totalDocs, input);
|
||||
}
|
||||
|
||||
return infos;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue