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


##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/managed/ManagedObject.java:
##########
@@ -27,8 +27,11 @@
 class ManagedObject<T extends RocksObject> implements AutoCloseable {
   private final T original;
 
+  private final StackTraceElement[] elements;
+
   ManagedObject(T original) {
     this.original = original;
+    this.elements = Thread.currentThread().getStackTrace();

Review Comment:
   I'm not sure it's a good idea to pay the cost of capturing the current 
stacktrace for every allocated RockObject in production. Maybe we should do 
that for debugging purpose only (when `LOG.isDebugEnabled()`).



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