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


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/ExternalCatalog.java:
##########
@@ -1268,9 +1317,8 @@ private String getLocalDatabaseName(String dbName, 
boolean isReplay) {
             // Mode 2: Case-insensitive comparison
             finalName = lowerCaseToDatabaseName.get(dbName.toLowerCase());
             if (finalName == null && !isReplay) {
-                // Refresh database list and try again
                 try {
-                    getFilteredDatabaseNames();
+                    metaCache.refreshNames();

Review Comment:
   [P2] Preserve cancellation across the catalog miss fallback
   
   If a mode-2 lookup waits on a warm background name refresh and is 
interrupted, `refreshNames()` now restores the flag and propagates a 
`CompletionException`, but this broad catch consumes it. `getDbNullable()` then 
keeps the original name and enters `metaCache.getMetaObj()`; on a miss, 
`buildDbForInit(..., true)` can reuse the warm snapshot and fall through to 
`getFilteredDatabaseNames()`, starting a separate connector enumeration on the 
cancelled thread. This is downstream of the earlier `MetaCache` waiter issue: 
that internal catch is fixed, while this outer catch discards its cancellation 
and starts another load. Please rethrow when the caller is interrupted and 
cover a warm mode-2 refresh waiter that cannot enter the object/name loader 
after cancellation.



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