gortiz commented on code in PR #15571:
URL: https://github.com/apache/pinot/pull/15571#discussion_r2067934786
##########
pinot-common/src/main/java/org/apache/pinot/common/datablock/DataBlockUtils.java:
##########
@@ -252,7 +252,7 @@ public static DataBlock readFrom(ByteBuffer buffer)
public static DataBlock deserialize(List<ByteBuffer> buffers)
throws IOException {
List<DataBuffer> dataBuffers = buffers.stream()
- .map(PinotByteBuffer::wrap)
+ .map(PinotByteBuffer::slice)
Review Comment:
Because PinotByteBuffer.wrap assumes the buffer will be stable and their
cursors (position, limit, etc) won't be changed. When using wrap, tests fail.
Probably this situation doesn't happen in real live, where byte buffers are
going to be sent to other JVMs, but it looks like we are changing buffers
during tests. Anyway, it is safer to slice here to be sure these cursors are
immutable.
--
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]