Jackie-Jiang commented on a change in pull request #5400:
URL: https://github.com/apache/incubator-pinot/pull/5400#discussion_r426992999
##########
File path:
pinot-core/src/main/java/org/apache/pinot/core/io/readerwriter/impl/FixedByteSingleColumnMultiValueReaderWriter.java
##########
@@ -132,47 +129,40 @@ public FixedByteSingleColumnMultiValueReaderWriter(int
maxNumberOfMultiValuesPer
_maxNumberOfMultiValuesPerRow = maxNumberOfMultiValuesPerRow;
_headerSize = rowCountPerChunk * SIZE_OF_INT * NUM_COLS_IN_HEADER;
_rowCountPerChunk = rowCountPerChunk;
- addHeaderBuffers();
+ addHeaderBuffer();
//at least create space for million entries, which for INT translates into
4mb buffer
_incrementalCapacity = incrementalCapacity;
- addDataBuffers(initialCapacity);
+ addDataBuffer(initialCapacity);
//init(_rowCountPerChunk, _columnSizeInBytes,
_maxNumberOfMultiValuesPerRow, initialCapacity, _incrementalCapacity);
}
- private void addHeaderBuffers() {
+ private void addHeaderBuffer() {
LOGGER.info("Allocating header buffer of size {} for: {}", _headerSize,
_context);
- _headerBuffer = _memoryManager.allocate(_headerSize, _context);
+ // NOTE: PinotDataBuffer is tracked in the PinotDataBufferMemoryManager.
No need to track it inside the class.
+ PinotDataBuffer headerBuffer = _memoryManager.allocate(_headerSize,
_context);
Review comment:
MemoryManager allocates and tracks all the buffers. It releases them
when the segment is closed.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]