You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by jp...@apache.org on 2017/12/20 11:49:42 UTC

[2/2] lucene-solr:branch_7x: LUCENE-8077: Fixed wrong modulo usage in CheckIndex.

LUCENE-8077: Fixed wrong modulo usage in CheckIndex.


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/2487895b
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/2487895b
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/2487895b

Branch: refs/heads/branch_7x
Commit: 2487895b188e771594b11a7618be523d04424692
Parents: 493220a
Author: Adrien Grand <jp...@gmail.com>
Authored: Wed Dec 20 12:48:04 2017 +0100
Committer: Adrien Grand <jp...@gmail.com>
Committed: Wed Dec 20 12:48:52 2017 +0100

----------------------------------------------------------------------
 lucene/CHANGES.txt                                           | 5 +++++
 lucene/core/src/java/org/apache/lucene/index/CheckIndex.java | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/2487895b/lucene/CHANGES.txt
----------------------------------------------------------------------
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index af82df1..d4cb36e 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -36,6 +36,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

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/2487895b/lucene/core/src/java/org/apache/lucene/index/CheckIndex.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/index/CheckIndex.java b/lucene/core/src/java/org/apache/lucene/index/CheckIndex.java
index 0e6f6ab..ab37c12 100644
--- a/lucene/core/src/java/org/apache/lucene/index/CheckIndex.java
+++ b/lucene/core/src/java/org/apache/lucene/index/CheckIndex.java
@@ -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 + ")");