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


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/ExternalDatabase.java:
##########
@@ -650,15 +773,12 @@ public CatalogIf getCatalog() {
     @Override
     public boolean registerTable(TableIf tableIf) {
         makeSureInitialized();
-        String tableName = tableIf.getName();
+        T table = (T) tableIf;
         if (LOG.isDebugEnabled()) {
-            LOG.debug("create table [{}]", tableName);
+            LOG.debug("create table [{}]", table.getName());
         }
         if (isInitialized()) {
-            String localName = extCatalog.fromRemoteTableName(this.remoteName, 
tableName);
-            metaCache.updateCache(tableName, localName, (T) tableIf,
-                    Util.genIdByName(extCatalog.getName(), name, localName));
-            lowerCaseToTableName.put(tableName.toLowerCase(), tableName);
+            updateTableCache(table, table.getRemoteName(), table.getName());

Review Comment:
   Rebased on the latest PR head; this fix is now in `d700f9ecf5a`. The 
implementation is unchanged: `HMSExternalDatabase.registerTable()` no longer 
re-enters `getTableNullable()`, so CREATE events stay cache-only under 
`db.writeLock()`, and the FE test now exercises the real HMS production path 
with both cold-cache and hot-object coverage.



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