uschindler commented on code in PR #13906:
URL: https://github.com/apache/lucene/pull/13906#discussion_r1799835249
##########
lucene/core/src/java21/org/apache/lucene/store/MemorySegmentIndexInput.java:
##########
@@ -563,6 +563,13 @@ public final MemorySegmentIndexInput slice(String
sliceDescription, long offset,
return buildSlice(sliceDescription, offset, length);
}
+ public RandomAccessInput randomAccessSlice(long offset, long length) throws
IOException {
+ if (offset == 0 && length == this.length) {
+ return this;
Review Comment:
But this code is perfectly fine as random access slices are stateless, so we
can simply return the current instance.
--
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]