Jackie-Jiang commented on code in PR #13215:
URL: https://github.com/apache/pinot/pull/13215#discussion_r1612402309


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/io/writer/impl/MutableOffHeapByteArrayStore.java:
##########
@@ -178,7 +178,9 @@ public 
MutableOffHeapByteArrayStore(PinotDataBufferMemoryManager memoryManager,
       int numArrays, int avgArrayLen) {
     _memoryManager = memoryManager;
     _allocationContext = allocationContext;
-    _startSize = numArrays * (avgArrayLen + 4); // For each array, we store 
the array and its startoffset (4 bytes)
+    int estimatedSize =
+        numArrays * (avgArrayLen + 4); // For each array, we store the array 
and its startoffset (4 bytes)

Review Comment:
   We need to make it more robust by using long to calculate the result and 
then cap it at `Integer.MAX_VALUE`. Currently if it is larger than 4G, we will 
end up with a very small start size.



-- 
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

Reply via email to