jpountz commented on a change in pull request #1434: LUCENE-9324: Add an ID to
SegmentCommitInfo
URL: https://github.com/apache/lucene-solr/pull/1434#discussion_r410189327
##########
File path: lucene/core/src/java/org/apache/lucene/index/SegmentInfos.java
##########
@@ -374,7 +376,18 @@ public static final SegmentInfos readCommit(Directory
directory, ChecksumIndexIn
if (softDelCount + delCount > info.maxDoc()) {
throw new CorruptIndexException("invalid deletion count: " +
softDelCount + delCount + " vs maxDoc=" + info.maxDoc(), input);
}
- SegmentCommitInfo siPerCommit = new SegmentCommitInfo(info, delCount,
softDelCount, delGen, fieldInfosGen, dvGen);
+ final byte[] sciId;
+ if (format > VERSION_74 ) {
+ if (input.readByte() == 1) {
Review comment:
can you be stricter and throw a CorruptIndexException if the byte is neither
0 nor 1?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]