andyhuangdev opened a new pull request, #11546: URL: https://github.com/apache/ozone/pull/11546
## What changes were proposed in this pull request? Datanode schema V3 automatic small SST file compaction creates ManagedCompactRangeOptions without closing it, leaking native memory on each range compaction. This patch uses try-with-resources to close the options after compaction, including when compaction throws an exception. Compaction behavior remains unchanged. ## What is the link to the Apache JIRA [HDDS-17011](https://issues.apache.org/jira/browse/HDDS-17011) ## How was this patch tested? Added a parameterized regression test in TestKeyValueContainer that verifies the options release their native handle on both successful and failed compaction. Both cases failed before the fix and passed afterward. - Ran TestKeyValueContainer, TestHddsVolume, and TestDatanodeStoreCache: 234 tests, 0 failures, 0 errors, 6 skipped. - Ran ./hadoop-ozone/dev-support/checks/checkstyle.sh successfully. - Ran git diff --check successfully. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
