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


##########
hadoop-hdds/managed-rocksdb/src/main/java/org/apache/hadoop/hdds/utils/db/managed/ManagedRocksObjectUtils.java:
##########
@@ -41,27 +42,24 @@ private ManagedRocksObjectUtils() {
 
   public static final Logger LOG =
       LoggerFactory.getLogger(ManagedRocksObjectUtils.class);
+
   private static final Duration POLL_DELAY_DURATION = Duration.ZERO;
   private static final Duration POLL_INTERVAL_DURATION = 
Duration.ofMillis(100);
 
-  public static void assertClosed(ManagedObject<?> object) {
-    assertClosed(object.get(), object.getStackTrace());
-  }
 
-  static void assertClosed(RocksObject rocksObject, String stackTrace) {
+  private static final LeakDetector LEAK_DETECTOR = new 
LeakDetector("ManagedRocksObject");
+
+  static LeakTracker track(AutoCloseable object, @Nullable StackTraceElement[] 
stackTrace) {

Review Comment:
   > * Get `stackTrace` inside this method instead of passing it in order to 
reduce code duplication.
   
   This one I also included in HDDS-10000.  Since the `stackTrace` members 
already exist, i.e. the duplication is not introduced here, I thought it can be 
done as a follow-up.



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