You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@parquet.apache.org by "Fokko (via GitHub)" <gi...@apache.org> on 2026/09/04 14:08:02 UTC

Re: [PR] GH-3558: Properly close buffers [parquet-java]

Fokko commented on code in PR #3559:
URL: https://github.com/apache/parquet-java/pull/3559#discussion_r3934804701


##########
parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetFileReader.java:
##########
@@ -2368,6 +2384,10 @@ public void readFromVectoredRange(ParquetFileRange currRange, ChunkListBuilder b
         LOG.error(error, e);
         throw new IOException(error, e);
       }
+      // Release the vectored-read buffer back to the allocator when the row group is closed.
+      // Requires fs.file.checksum.verify=false so the returned buffer is the allocator buffer
+      // rather than a sliced subset (see Hadoop's fs.file.checksum.verify docs).
+      builder.addBuffersToRelease(Collections.singletonList(buffer));

Review Comment:
   Thanks, this is a great one. I've moved it up



-- 
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: issues-unsubscribe@parquet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@parquet.apache.org
For additional commands, e-mail: issues-help@parquet.apache.org