You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mi...@apache.org on 2021/03/29 18:00:09 UTC

[lucene-solr] branch branch_8x updated: LUCENE-9888: re-enable CheckIndex verification that indexSort is the same across all segments

This is an automated email from the ASF dual-hosted git repository.

mikemccand pushed a commit to branch branch_8x
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/branch_8x by this push:
     new 4f62826  LUCENE-9888: re-enable CheckIndex verification that indexSort is the same across all segments
4f62826 is described below

commit 4f628262e5370bafbd619a2156a259b22703abef
Author: Mike McCandless <mi...@apache.org>
AuthorDate: Mon Mar 29 13:59:31 2021 -0400

    LUCENE-9888: re-enable CheckIndex verification that indexSort is the same across all segments
---
 lucene/core/src/java/org/apache/lucene/index/CheckIndex.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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 e7e6522..c02c89c 100644
--- a/lucene/core/src/java/org/apache/lucene/index/CheckIndex.java
+++ b/lucene/core/src/java/org/apache/lucene/index/CheckIndex.java
@@ -607,6 +607,8 @@ public final class CheckIndex implements Closeable {
     result.newSegments.clear();
     result.maxSegmentName = -1;
 
+    Sort previousIndexSort = null;
+
     for(int i=0;i<numSegments;i++) {
       final SegmentCommitInfo info = sis.info(i);
       long segmentName = Long.parseLong(info.info.name.substring(1), Character.MAX_RADIX);
@@ -630,7 +632,6 @@ public final class CheckIndex implements Closeable {
       int toLoseDocCount = info.info.maxDoc();
 
       SegmentReader reader = null;
-      Sort previousIndexSort = null;
 
       try {
         msg(infoStream, "    version=" + (version == null ? "3.0" : version));