gortiz commented on code in PR #12808: URL: https://github.com/apache/pinot/pull/12808#discussion_r1558916116
########## pinot-segment-spi/src/main/java/org/apache/pinot/segment/spi/memory/unsafe/DirectMemory.java: ########## @@ -56,8 +56,12 @@ public void flush() { @Override public synchronized void close() { if (!_closed) { - Unsafer.UNSAFE.freeMemory(_address); - _closed = true; + synchronized (this) { Review Comment: You are right, but we can remove that first synchronized now, right? -- 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