github-actions[bot] commented on code in PR #66913:
URL: https://github.com/apache/doris/pull/66913#discussion_r4011124702


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HMSExternalCatalog.java:
##########
@@ -164,10 +236,21 @@ public void onClose() {
             metadataOps.close();
             metadataOps = null;
         }
-        if (null != icebergMetadataOps) {
-            icebergMetadataOps.close();
-            icebergMetadataOps = null;
-        }
+        icebergResourceTracker.retireCurrent(() -> {

Review Comment:
   [P1] Remove the HMS Iceberg group before retiring this tracker
   
   `CatalogMgr.cleanupRemovedCatalog()` calls `onClose()` before 
`removeCatalog*()`, so cached HMS-Iceberg table values still retain this 
generation here. When the later group close synchronously retires those values, 
the final reference can run Iceberg metadata/catalog close and executor 
shutdown under the lifecycle/cache-removal lock stack, blocking unrelated cache 
work. The native Iceberg path now removes `IcebergExternalMetaCache.ENGINE` 
before `retireCurrent()`, but this HMS direct DROP/rename path still uses the 
old order. Please preserve HMS's lifecycle-stripe -> catalog-monitor order 
(rather than calling `removeCatalogByEngine()` from inside the current 
synchronized method), retire the Iceberg group before this tracker, and add a 
direct-close regression with a cached HMS-Iceberg table.



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