Copilot commented on code in PR #9460:
URL: https://github.com/apache/gravitino/pull/9460#discussion_r2609811239


##########
catalogs/hive-metastore-common/src/main/java/org/apache/gravitino/hive/CachedClientPool.java:
##########
@@ -154,6 +149,5 @@ public void close() {
     // class loader is closed.
     clientPoolCache.asMap().forEach((key, value) -> value.close());
     clientPoolCache.invalidateAll();
-    scheduler.shutdownNow();
   }

Review Comment:
   The scheduler is being removed but not shut down. The comment indicates this 
is intentional, but there's a memory leak risk. The scheduler thread will 
continue running after clientPoolCache is cleared. Consider calling 
`scheduler.shutdownNow()` to properly clean up resources.



##########
catalogs/catalog-lakehouse-hudi/src/test/java/org/apache/gravitino/catalog/lakehouse/hudi/integration/test/HudiCatalogHMSIT.java:
##########
@@ -95,6 +96,14 @@ public void prepare() {
             ImmutableMap.of(CATALOG_BACKEND, "hms", URI, hmsURI));
   }
 
+  @AfterAll
+  public void close() {
+    if (sparkSession != null) {
+      sparkSession.close();
+      sparkSession = null;
+    }
+  }

Review Comment:
   The method signature should be consistent with override. The annotation 
`@AfterAll` expects a static method, but this method is not static. This will 
cause a test execution failure.



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

Reply via email to