uschindler commented on code in PR #12600:
URL: https://github.com/apache/lucene/pull/12600#discussion_r1344093638


##########
lucene/core/src/java19/org/apache/lucene/store/MemorySegmentIndexInput.java:
##########
@@ -168,6 +168,28 @@ private void readBytesBoundary(byte[] b, int offset, int 
len) throws IOException
     }
   }
 
+  private void readBytesBoundary(long pos, byte[] b, int offset, int len) 
throws IOException {

Review Comment:
   Of course the same comments apply for all other variants of 
MemorySegmentIndexInput.



##########
lucene/core/src/java19/org/apache/lucene/store/MemorySegmentIndexInput.java:
##########
@@ -168,6 +168,28 @@ private void readBytesBoundary(byte[] b, int offset, int 
len) throws IOException
     }
   }
 
+  private void readBytesBoundary(long pos, byte[] b, int offset, int len) 
throws IOException {

Review Comment:
   Maybe we could reuse the code and make the relative readBytes() method call 
this positional one and increment currentPosition and curSegment? This may be a 
followup issue, for now it is too risky to change the current impl for relative 
reads.



##########
lucene/core/src/java19/org/apache/lucene/store/MemorySegmentIndexInput.java:
##########
@@ -168,6 +168,28 @@ private void readBytesBoundary(byte[] b, int offset, int 
len) throws IOException
     }
   }
 
+  private void readBytesBoundary(long pos, byte[] b, int offset, int len) 
throws IOException {

Review Comment:
   I would move that method behind the random access readBytes method. It does 
not fit here. In contrast to ByteBufferIndexInput the boundary method was 
refactored to a separate method, but it was just done for better readability.



-- 
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: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to