Gabriel39 commented on code in PR #69720:
URL: https://github.com/apache/doris/pull/69720#discussion_r4397071328
##########
fe/fe-core/src/main/java/org/apache/doris/catalog/RefreshManager.java:
##########
@@ -162,17 +162,14 @@ public void handleRefreshTable(String catalogName, String
dbName, String tableNa
return;
}
- TableIf table = db.getTableNullable(tableName);
- if (table == null) {
- if (!ignoreIfNotExists) {
- throw new DdlException("Table " + tableName + " does not exist
in db " + dbName);
- }
- return;
- }
- long updateTime = System.currentTimeMillis();
- refreshTableInternal((ExternalDatabase) db, (ExternalTable) table,
updateTime, true);
+ // A forwarding FE may retain a dropped table that is cold on the
master. Refresh by name so
+ // remote absence cannot prevent invalidating that FE's stale lookup
through the edit log.
+ ExternalDatabase<?> externalDb = (ExternalDatabase<?>) db;
+ String localTableName = externalDb.getTableForReplay(tableName)
+ .map(ExternalTable::getName).orElse(tableName);
ExternalObjectLog log =
ExternalObjectLog.createForExplicitRefreshTable(
- catalog.getId(), db.getFullName(), table.getName(),
updateTime);
+ catalog.getId(), db.getFullName(), localTableName,
System.currentTimeMillis());
+ replayRefreshTable(log);
Review Comment:
Agreed. Updated in 6b813d9f27:
- Removed `ignoreIfNotExists` from the method and all callers. Missing
catalog/type/database validation and command privilege checks remain in place.
- Extracted `applyTableRefresh()` for the common cache effects. Command
execution owns validation/journaling; replay owns journal checks and rename
dispatch. The `invalidateTableLookup` journal flag, content-only refresh
behavior, generation fencing, invalidation ordering, and journal format/order
are preserved.
- Added coverage for missing-database rejection without a journal, a cold
table whose metadata loader must not be called, repeated refresh of a
never-existing name, and mixed-case follower identities with a cold master in
modes 1/2.
- Documented absent-name success and lazy schema loading in both current
English/Chinese references: https://github.com/apache/doris-website/pull/4539.
The PR description and release note explain the same contract.
Validation: `run-fe-ut.sh` completed successfully with 89 selected tests
passing and no failures/errors/skips. Repository FE Checkstyle passed across 72
modules. The existing multi-FE regression coverage remains in place.
--
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]