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


##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/managed/ManagedObject.java:
##########
@@ -42,7 +49,23 @@ public void close() {
 
   @Override
   protected void finalize() throws Throwable {
-    ManagedRocksObjectUtils.assertClosed(original);
+    ManagedRocksObjectUtils.assertClosed(this);
     super.finalize();
   }
+
+  public String getStackTrace() {
+    if (elements != null && elements.length > 0) {
+      // 15 lines should be good enough to know the caller of
+      // the unclosed instance?
+      int maxStackTraceLines = 15;

Review Comment:
   This will only show up when something went wrong, it's okay not to limit the 
stacktrace or use a longer stack trace.



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