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


##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/managed/ManagedRocksObjectUtils.java:
##########
@@ -41,6 +41,20 @@ static void assertClosed(RocksObject rocksObject) {
     }
   }
 
+  static void assertClosed(ManagedObject<?> object) {
+    RocksObject rocksObject = object.get();
+    ManagedRocksObjectMetrics.INSTANCE.increaseManagedObject();
+    if (rocksObject.isOwningHandle()) {
+      ManagedRocksObjectMetrics.INSTANCE.increaseLeakObject();
+      LOG.warn("{} is not closed properly",
+          rocksObject.getClass().getSimpleName());
+      if (LOG.isDebugEnabled()) {
+        LOG.debug("StackTrace for unclosed instance: {}",
+            object.getStackTrace());
+      }
+    }

Review Comment:
   Thanks @sadanand48 for updating the patch.



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