wenzhenghu commented on code in PR #65126:
URL: https://github.com/apache/doris/pull/65126#discussion_r3643666258


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/ExternalDatabase.java:
##########
@@ -526,51 +542,44 @@ public T getTableNullable(String tableName) {
         if (finalName == null) {
             return null;
         }
-        // must use full qualified name to generate id.
-        // otherwise, if 2 databases have the same table name, the id will be 
the same.
-        return metaCache.getMetaObj(finalName,
-                Util.genIdByName(extCatalog.getName(), name, 
finalName)).orElse(null);
+        T table = tables.get(finalName);
+        if (table != null) {
+            tableIdToName.put(table.getId(), finalName);

Review Comment:
   Thanks again for pointing this out. This issue has now been fixed in the 
current PR.
   
   We updated the per-key publication/invalidation protocol so that:
   - hot named lookup can no longer republish stale `dbIdToName` / 
`tableIdToName` after concurrent DROP/RENAME;
   - generation-rejected miss loads do not publish ID navigation state;
   - register/update and invalidate/unregister now update object cache and ID 
map under the same per-key ordering.
   
   We also added deterministic tests covering the relevant cases, including:
   - table/database hot hit vs DROP;
   - table/database miss-load vs DROP;
   - disabled-cache lookup vs unregister;
   - hot-hit fast path when the ID mapping is already consistent.
   
   So the concern raised in this thread is now addressed in PR #65126. I will 
keep follow-up issue #66001 only for any broader work that remains outside the 
current PR scope, such as `invalidateAll()` / global barrier handling.



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