xiangfu0 commented on code in PR #19273:
URL: https://github.com/apache/pinot/pull/19273#discussion_r3878153027
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/io/writer/impl/MutableOffHeapByteArrayStore.java:
##########
@@ -90,6 +90,14 @@ private static class Buffer implements Closeable {
private int _numValues = 0;
private int _availEndOffset; // Exclusive
+ /// Read-only view of the whole region, so that [#getByteBuffer] can hand
out a value view with a single `slice`
+ /// rather than the `duplicate` + `slice` + `asReadOnlyBuffer` chain
building one from scratch costs. Reads on the
+ /// consuming MAP path go through here once per row per projected key, so
those allocations add up.
+ ///
+ /// Built on first use rather than up front, so a store that is never read
this way - every dictionary and every
+ /// non-MAP raw column - behaves exactly as before. Racing readers may
each build one; they are interchangeable,
+ /// and the field is volatile so a reader never sees a half-initialized
buffer.
+ private volatile ByteBuffer _readOnlyView;
Review Comment:
Split complete. #19273 now contains only slice A: selective MAP-key reads
for sealed V2-V6 forward indexes. The shared off-heap byte-read changes and
multi-key grouping/wiring have been removed for separate follow-ups. I also
added compressed/pass-through V2/V3 coverage, retained the V4-V6 compression
matrix, and added like-for-like sealed benchmark pairs.
--
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]