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 for pointing this out. I agree this is a real correctness issue.
My current understanding is that PR #65126 does expose a new hot-hit window
here, because named lookup can now republish `dbIdToName` / `tableIdToName`
after reading a hot object. At the same time, the broader class of ordering
problem is not entirely new, since similar gaps already existed on baseline
miss-load / cache-update paths before this refactor.
That said, this currently looks like a relatively low-probability race
window with limited practical impact, rather than a common user-facing failure
mode. It requires a specific interleaving between lookup and concurrent
invalidation/drop/rename, and the current impact seems more concentrated in
stale by-ID navigation or repeated reload attempts after cleanup.
Given that, I would prefer to track this as a dedicated follow-up issue and
handle it in a separate PR, so we can fix the ordering problem consistently
across both `dbIdToName` / `databases` and `tableIdToName` / `tables`, instead
of doing a narrow local fix in the current PR. I opened a follow-up issue here:
https://github.com/apache/doris/issues/66001
--
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]