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


##########
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:
   Sorry for the late comment @adoroszlai. We could've just put leakTracker 
before the main `close`. This would mean that leakTracker is meant to track if 
resource closure is invoked by the application code, regardless of the result 
(success or failure).
   
   ```
     public void close() {
      leakTracker.close();
      super.close();
   ```



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