msokolov commented on code in PR #14607:
URL: https://github.com/apache/lucene/pull/14607#discussion_r2478334192
##########
lucene/core/src/java/org/apache/lucene/index/SegmentInfos.java:
##########
@@ -402,11 +389,38 @@ private static void parseSegmentInfos(
}
long totalDocs = 0;
+
for (int seg = 0; seg < numSegments; seg++) {
String segName = input.readString();
byte[] segmentID = new byte[StringHelper.ID_LENGTH];
input.readBytes(segmentID, 0, segmentID.length);
- Codec codec = readCodec(input);
+ Codec codec = null;
+ try {
+ codec = readCodec(input);
Review Comment:
I tried something different, changing
```
format = CodecUtil.checkHeaderNoMagic(input, "segments", VERSION_74,
VERSION_CURRENT);
```
to
```
format = CodecUtil.checkHeaderNoMagic(input, "segments", VERSION_86,
VERSION_CURRENT);
```
since we can't read 7.4 anyway, why do we pretend to do so here?
and this makes the test pass up until version 8.0 indexes, when it fails in
a new way I haven't understood yet (the below assertion fails for 8.0):
```
if (version.startsWith("8.") || version.startsWith("9.")) {
assertTrue(indexStatus.clean);
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]