RockteMQ-AI commented on issue #10218:
URL: https://github.com/apache/rocketmq/issues/10218#issuecomment-5327963380

   **Issue Evaluation**
   
   Category: `bug` | Status: **Confirmed**
   
   The resource leak in `DumpCompactionLogCommand` is valid. The 
`RandomAccessFile` is created inline and immediately discarded after 
`.getChannel()`, making it impossible to close. The `FileChannel` is also never 
closed.
   
   **Root Cause:** Missing try-with-resources for `RandomAccessFile` and 
`FileChannel`.
   **Impact:** File descriptor leak each time the compaction log dump tool is 
invoked.
   **Severity:** Medium (tool usage, not hot path, but still a correctness 
issue)
   
   Suggested fix: Wrap both `RandomAccessFile` and `FileChannel` in 
try-with-resources.
   
   ---
   *Automated evaluation by RockteMQ-AI*


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