suxiaogang223 commented on issue #12918:
URL: https://github.com/apache/hudi/issues/12918#issuecomment-2706168126

   @danny0405 I believe the key issue is that even when we explicitly call the 
close() function of BitCaskDiskMap, the JVM still won't garbage collect the 
BitCaskDiskMap class itself due to circular references, which is what we 
observed.
   ```java
     /**
      * Close and cleanup the Map.
      */
     public void close() {
       cleanup(false);
     }
   
     /**
      * Cleanup all resources, files and folders.
      */
     private void cleanup(boolean isTriggeredFromShutdownHook) {
       try {
         FileIOUtils.deleteDirectory(diskMapPathFile);
       } catch (IOException exception) {
         LOG.warn("Error while deleting the disk map directory=" + diskMapPath, 
exception);
       }
       if (!isTriggeredFromShutdownHook && shutdownThread != null) {
         Runtime.getRuntime().removeShutdownHook(shutdownThread);
       }
     }
   ```


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

Reply via email to