swamirishi commented on code in PR #4692:
URL: https://github.com/apache/ozone/pull/4692#discussion_r1190396937


##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/RocksDatabase.java:
##########
@@ -900,5 +902,19 @@ public static Map<String, List<ColumnFamilyHandle>> 
getCfHandleMap() {
     return dbNameToCfHandleMap;
   }
 
-
+  @Override
+  protected void finalize() throws Throwable {
+    if (!isClosed()) {
+      String warning = "RocksDatabase is not closed properly.";
+      if (LOG.isDebugEnabled()) {
+        String stackTrace =
+            Arrays.toString(Thread.currentThread().getStackTrace());

Review Comment:
   This will have the GC thread stacktrace, it wouldn't be of much help here. I 
guess this can go along with the warning & need not go only on debug.



##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/RocksDatabase.java:
##########
@@ -900,5 +902,19 @@ public static Map<String, List<ColumnFamilyHandle>> 
getCfHandleMap() {
     return dbNameToCfHandleMap;
   }
 
-
+  @Override
+  protected void finalize() throws Throwable {
+    if (!isClosed()) {
+      String warning = "RocksDatabase is not closed properly.";
+      if (LOG.isDebugEnabled()) {
+        String stackTrace =
+            Arrays.toString(Thread.currentThread().getStackTrace());

Review Comment:
   I guess the stacktrace should be in the place where it got initialized



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