github-actions[bot] commented on code in PR #69806:
URL: https://github.com/apache/doris/pull/69806#discussion_r4420494186


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/scan/PluginDrivenScanNode.java:
##########
@@ -212,10 +214,19 @@ public PluginDrivenScanNode(PlanNodeId id, 
TupleDescriptor desc,

Review Comment:
   [P1] Retain the source observation through system-table split planning. This 
new scan-node observation is stored and used for `buildColumnHandles`, but 
`getSplits` later calls `scanProvider.planScan` directly. For an Iceberg REST 
`$labels` table, a cross-query `tableCache` hit can provide the handle while 
the fixed labels schema leaves no base table in the statement scope; if that 
cache entry expires before `planScan`, `resolveSysBaseTable` calls 
`ops.loadTable` directly and the system-table branch rethrows raw 
`NoSuchTableException`. The failure never reaches `MetadataRead`, so the source 
ID/name and connector caches stay stale. Carry the source observation through 
provider planning (or normalize and route this absence through the cleanup 
seam) and add a concurrent-drop `$labels` split-planning test.



##########
fe/fe-core/src/main/java/org/apache/doris/datasource/ExternalDatabase.java:
##########
@@ -92,6 +93,9 @@ public abstract class ExternalDatabase<T extends 
ExternalTable>
     private FeMetaCacheEntry<String, NameCacheValue> tableNames;
     private FeMetaCacheEntry<String, T> tables;
     private transient IdNameIndex tableIdNameIndex = new IdNameIndex("external 
table");
+    // Guarded by extCatalog. Lookup refresh can replace table objects before 
invalidation completes.
+    private transient long tableLookupRefreshGeneration;
+    private transient int activeTableLookupRefreshes;
 
     private volatile boolean isInitializing = false;
 

Review Comment:
   [P1] Match folded aliases by mapped local identity before suppressing 
cleanup. With `lower_case_table_names=1`, `meta_names_mapping` can map `Foo` to 
`foo_old` and `FOO` to `foo_new`. After `Foo` is dropped, `currentRemote` is 
null for the old object, but `remoteNameForCaseInsensitiveLookup("Foo")` still 
finds `FOO` and this guard returns empty. The old object, numeric ID route, and 
connector caches then remain stale even though the surviving alias has a 
different local identity. Compare mapped local names (or retain the 
remote-to-local association) before denying cleanup, and add a mode-1 mapping 
regression.



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