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


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/readers/forward/ChunkReaderContext.java:
##########
@@ -52,11 +51,8 @@ public ChunkReaderContext(int maxChunkSize) {
   }
 
   @Override
-  public void close()
-      throws IOException {
-    if (CleanerUtil.UNMAP_SUPPORTED) {
-      CleanerUtil.getCleaner().freeBuffer(_chunkBuffer);
-    }
+  public void close() {
+    CleanerUtil.cleanQuietly(_chunkBuffer);

Review Comment:
   I still feel it is safer to add a boolean flag `_closed` to ensure clean is 
only invoked once. It is OS dependent behavior



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

Reply via email to