gortiz commented on code in PR #12242: URL: https://github.com/apache/pinot/pull/12242#discussion_r1453022438
########## pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/readers/forward/VarByteChunkSVForwardIndexReader.java: ########## @@ -85,6 +85,10 @@ private String getStringCompressed(int docId, ChunkReaderContext context) { int length = valueEndOffset - valueStartOffset; byte[] bytes = _reusableBytes.get(); + if (bytes.length < _lengthOfLongestEntry) { Review Comment: Just to be clear: The original reason to have a ThreadLocal was to do not allocate one byte[] per row, which is expensive. Allocating one byte[] per segment is totally fine. We allocate quite more than that in other parts of the same path. And usually it is a bad thing to be too aggressive at catching in a managed environment like the JVM -- 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