wenzhenghu commented on code in PR #65126:
URL: https://github.com/apache/doris/pull/65126#discussion_r3542214801
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/ExternalDatabase.java:
##########
@@ -570,17 +671,15 @@ public void unregisterTable(String tableName) {
LOG.debug("unregister table {}.{}", this.name, tableName);
}
setLastUpdateTime(System.currentTimeMillis());
- // check if the table exists in cache, it not, does return
- ExternalTable dorisTable = getTableForReplay(tableName).orElse(null);
+ String localTableName = toLocalTableName(tableName);
+ ExternalTable dorisTable =
getTableForReplay(localTableName).orElse(null);
+ // Always clean local names/object/ID state, even when the object
entry is cold or already evicted.
+ if (isInitialized()) {
+ invalidateTableCache(localTableName);
+ }
Review Comment:
Thank you for checking this path in detail.
After tracing the mode-2 key flow again, I do not think this issue applies
to the current implementation. In mode 2, `toLocalTableName()` intentionally
preserves the remote/original-case name, and the object cache uses that same
key convention as well.
So the cache publication path and the invalidation path are aligned on the
same key semantics here, and `unregisterTable()` is invalidating the expected
key in the current code.
I agree this would become a real concern if local display names and
object-cache keys were intentionally decoupled, but that is not the current
mode-2 behavior in this PR.
--
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]