adoroszlai commented on code in PR #6013:
URL: https://github.com/apache/ozone/pull/6013#discussion_r1459744131


##########
hadoop-hdds/managed-rocksdb/src/main/java/org/apache/hadoop/hdds/utils/db/managed/ManagedBloomFilter.java:
##########
@@ -31,7 +31,10 @@ public class ManagedBloomFilter extends BloomFilter {
 
   @Override
   public void close() {
-    super.close();
-    leakTracker.close();
+    try {
+      super.close();
+    } finally {
+      leakTracker.close();

Review Comment:
   Thanks @duongkame for the suggestion.  I had the same idea, but preferred 
the one in the PR: a problem in `leakTracker.close()` might prevent release of 
the underlying (real) resource.  `try-finally` is not that much more complex.



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

Reply via email to