suxiaogang223 opened a new issue, #12918:
URL: https://github.com/apache/hudi/issues/12918

   **_Tips before filing an issue_**
   
   - Have you gone through our [FAQs](https://hudi.apache.org/learn/faq/)?
   
   - Join the mailing list to engage in conversations and get faster support at 
[email protected].
   
   - If you have triaged this as a bug, then file an 
[issue](https://issues.apache.org/jira/projects/HUDI/issues) directly.
   
   **Describe the problem you faced**
   
   While debugging a memory leak issue, I noticed a steady increase in the 
number of BitCaskDiskMap instances through jmap logs. Using VisualVM, I found 
that a memory leak may exist in BitCaskDiskMap due to a circular reference.
   
![Image](https://github.com/user-attachments/assets/88fa13b6-4f0a-4475-9ff1-e3f9a017dee2)
   From my investigation, it appears that the memory leak might be caused by a 
function closure where this refers to BitCaskDiskMap itself. Additionally, 
since BitCaskDiskMap holds a reference to shutdownThread, this could be 
preventing proper garbage collection.
   
   
![Image](https://github.com/user-attachments/assets/2e91f296-7804-4ca2-b8eb-22e247445392)
   I’m not entirely sure whether this implementation indeed leads to a memory 
leak, but based on my findings, it seems like a possible cause. Could you help 
confirm if this is an issue?
   
   


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