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


##########
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:
   This is not necessary. The whole `close()` is synchronized



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