itschrispeck opened a new pull request, #12539: URL: https://github.com/apache/pinot/pull/12539
Addresses https://github.com/apache/pinot/issues/12534 Based on my understanding, calling `_decompressor.decompress(compressedInput, decompressedOutput)` is problematic because it [moves the position](https://javadoc.io/doc/org.lz4/lz4-java/1.6.0/net/jpountz/lz4/LZ4DecompressorWithLength.html#decompress(java.nio.ByteBuffer,%20java.nio.ByteBuffer)) of the src and dest ByteBuffers. It is possible to move the position of the src buffer beyond the limit of the buffer (see issue for details). The change calls the [same underlying method](https://github.com/lz4/lz4-java/blob/master/src/java/net/jpountz/lz4/LZ4DecompressorWithLength.java#L246), but only moves the position of the dest buffer. The reason why this was a V4 raw index writer/reader version is that this only happens with the length prefixed LZ4 library, and this code path is not used for other raw index writer versions. Testing: Unit tested, now able to read a previously broken segment when loading it using PinotSegmentRecordReader -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org