itschrispeck commented on code in PR #15139:
URL: https://github.com/apache/pinot/pull/15139#discussion_r2008339976
##########
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 double checked by calling `context.close()` multiple times in the v4
reader/writer UT. We have also been running this portion of the PR in a prod
cluster for a couple weeks without issues.
My understanding was that invokeCleaner uses the cleaner API, [which only
runs the cleaner if it has not been run
before](https://github.com/AdoptOpenJDK/openjdk-jdk11/blob/master/src/java.base/share/classes/jdk/internal/ref/Cleaner.java#L137).
Doing multiple unsafe calls to .freeMemory() for the memory address would seg
fault
--
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]