richardstartin commented on a change in pull request #7595:
URL: https://github.com/apache/pinot/pull/7595#discussion_r732869620



##########
File path: 
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/io/writer/impl/BaseChunkSVForwardIndexWriter.java
##########
@@ -166,13 +172,15 @@ private int writeHeader(ChunkCompressionType 
compressionType, int totalDocs, int
    *
    */
   protected void writeChunk() {
-    int sizeToWrite;
+    int sizeWritten;
     _chunkBuffer.flip();
 
-    try {
-      sizeToWrite = _chunkCompressor.compress(_chunkBuffer, _compressedBuffer);
-      _dataFile.write(_compressedBuffer, _dataOffset);
-      _compressedBuffer.clear();
+    int maxCompressedSize = 
_chunkCompressor.maxCompressedSize(_chunkBuffer.limit());
+    // compress directly in to the mapped output rather keep a large buffer to 
compress into
+    try (PinotDataBuffer compressedBuffer = PinotDataBuffer.mapFile(_file, 
false, _dataOffset,

Review comment:
       this was supposed to be BIG_ENDIAN




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