LUCENE-8077: Fixed wrong modulo usage in CheckIndex.

This commit is contained in:
Adrien Grand 2017-12-20 12:48:04 +01:00
parent 9f7f76f267
commit b5ad314835
2 changed files with 6 additions and 1 deletions

View File

@ -94,6 +94,11 @@ Improvements
* LUCENE-8093: TrimFilterFactory implements MultiTermAwareComponent (Alan Woodward)
Bug Fixes
* LUCENE-8077: Fixed bug in how CheckIndex verifies doc-value iterators.
(Xiaoshan Sun via Adrien Grand)
======================= Lucene 7.2.0 =======================
API Changes

View File

@ -2195,7 +2195,7 @@ public final class CheckIndex implements Closeable {
throw new RuntimeException("dv iterator field=" + field + ": doc=" + (doc-1) + " has unstable advanceExact");
}
if (i % 1 == 0) {
if (i % 2 == 0) {
int doc2 = it2.nextDoc();
if (doc != doc2) {
throw new RuntimeException("dv iterator field=" + field + ": doc=" + doc + " was not found through advance() (got: " + doc2 + ")");