apoorvmittal10 opened a new pull request, #19581: URL: https://github.com/apache/kafka/pull/19581
The PR adds `slice` API in `Records.java` and further implementation in `MemoryRecords`. With the addition of ShareFetch and it's support to read from TieredStorage, where ShareFetch might acquire subset of fetch batches and TieredStorage emits MemoryRecords, hence a slice API is needed for MemoryRecords as well to limit the bytes transferred (if subset batches are acquired). MemoryRecords are sliced using `duplicate` and `slice` API of ByteBuffer, which are backed by the original buffer itself hence no-copy is created rather position, limit and offset are changed as per the new position and length. -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org