From b23e2617864ee65d4c4b82808f277897b42eee46 Mon Sep 17 00:00:00 2001 From: Mike McCandless Date: Mon, 12 Apr 2021 17:59:58 -0400 Subject: [PATCH] LUCENE-9888: revert CheckIndex change that confirmed all segments have identical segment sort: it is too strict --- .../src/java/org/apache/lucene/index/CheckIndex.java | 10 ---------- 1 file changed, 10 deletions(-) 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 cba33c9469a..a8bff8ba662 100644 --- a/lucene/core/src/java/org/apache/lucene/index/CheckIndex.java +++ b/lucene/core/src/java/org/apache/lucene/index/CheckIndex.java @@ -606,8 +606,6 @@ 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); @@ -653,14 +651,6 @@ public final class CheckIndex implements Closeable { Sort indexSort = info.info.getIndexSort(); if (indexSort != null) { msg(infoStream, " sort=" + indexSort); - if (previousIndexSort != null) { - if (previousIndexSort.equals(indexSort) == false) { - throw new RuntimeException( - "index sort changed from " + previousIndexSort + " to " + indexSort); - } - } else { - previousIndexSort = indexSort; - } } segInfoStat.numFiles = info.files().size(); segInfoStat.sizeMB = info.sizeInBytes() / (1024. * 1024.);