foxtail463 commented on code in PR #64160:
URL: https://github.com/apache/doris/pull/64160#discussion_r3746949911


##########
fe/fe-core/src/main/java/org/apache/doris/catalog/RefreshManager.java:
##########
@@ -175,42 +179,57 @@ public void replayRefreshTable(ExternalObjectLog log) {
             return;
         }
         boolean hasDbName = !Strings.isNullOrEmpty(log.getDbName());
+        boolean hasTableName = !Strings.isNullOrEmpty(log.getTableName());
+        boolean isRename = !Strings.isNullOrEmpty(log.getNewTableName());
         String localDbName = hasDbName
                 ? log.getDbName()
                 : catalog.getDbNameForReplay(log.getDbId()).orElse(null);
         Optional<ExternalDatabase<? extends ExternalTable>> db =
                 localDbName == null ? Optional.empty() : 
catalog.getDbForReplay(localDbName);
+        // Rename logs carry names but no IDs. Rebuild the old table identity 
used by the row-count cache.
+        long dbIdForInvalidation = isRename && hasDbName

Review Comment:
   首先 cache 是内存态,升级或者重会重置;就算没重置 cache 也不会影响正确性,在本 pr 之前 row count cache 
本身就是不一致的;我感觉尽量不引入兼容代码吧



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