github-actions[bot] commented on code in PR #69632:
URL: https://github.com/apache/doris/pull/69632#discussion_r4376911824
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/paimon/PaimonExternalTable.java:
##########
@@ -479,15 +486,21 @@ public boolean supportsLatestSnapshotPreload() {
@Override
public List<Column> getFullSchema() {
- // Descriptor serialization is table-only and may follow multiple
OPTIONS aliases. Keep it
- // on a validated statement projection rather than falling back to the
neutral cache.
- return getPaimonSchemaCacheValue(
-
MvccUtil.getSnapshotForTableMetadataFromContext(this)).getSchema();
+ return withMissingTableRepair(() -> {
Review Comment:
[P2] Cover the OPTIONS schema overload used during binding
`LogicalFileScan.captureRelationSchema()` calls
`getFullSchema(TableScanParams)`, bypassing these new schema wrappers. For a
nonempty `t@options('scan.mode'='latest')`, `StatementContext.loadSnapshots()`
can complete successfully and pin `scan.snapshot-id`; the later schema overload
calls `getPaimonTable(scanParams)`, whose `selectsSchema(resolvedOptions)`
branch reopens `getBasePaimonTable()`. With
`meta.cache.paimon.table.ttl-second=0`, an external drop between the successful
fence/snapshot load and this later reopen raises the base-table
`TableNotExistException` outside every repair boundary. The query fails but
complete FE names/object state survives, leaving `t` in `SHOW TABLES`. This is
a later overload after the already-fixed initial-fence route has returned.
Guard the OPTIONS schema/base-table read too, or reuse the retained statement
table where appropriate, and cover an interleaving that fails only during this
overload.
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/IcebergExternalTable.java:
##########
@@ -368,8 +381,10 @@ public Map<String, SysTable> getSupportedSysTables() {
@Override
public boolean isView() {
- makeSureInitialized();
- return isView;
+ return withMissingTableRepair(() -> {
Review Comment:
[P2] Guard the Iceberg property read after view detection
`getComment()->properties()` calls this guarded `isView()`, then performs
`IcebergUtils.withIcebergTable()` after the guard has returned.
`FrontendServiceImpl.listTableStatus()` calls `getComment()` before any schema
read, so `SHOW TABLE STATUS`/`information_schema.tables` can still confirm
remote absence without repairing lookup state. For a Hadoop Iceberg catalog
with `meta.cache.iceberg.table.ttl-second=0`, warm `SHOW TABLES` and `DESC t`,
drop `t` externally, then query its `TABLE_COMMENT` through
`information_schema.tables`: the [Iceberg 1.11
loader](https://github.com/apache/iceberg/blob/apache-iceberg-1.11.0/core/src/main/java/org/apache/iceberg/BaseMetastoreCatalog.java#L45-L55)
throws `NoSuchTableException`, which status enumeration logs and swallows,
while a subsequent `SHOW TABLES` still lists `t`. This is a separate
property/status accessor from the already-fixed schema-display thread. Enclose
the actual property read in the repair boundary and add status-path coverage
.
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/metacache/MetaCache.java:
##########
@@ -514,7 +531,11 @@ public Optional<T> getMetaObj(String name, long id) {
return null;
}
metaObjCache.put(name, loaded);
- idToName.put(id, name);
+ if (loaded.isPresent() || retainEmptyIdentity) {
+ idToName.put(id, name);
+ } else {
+ idToName.remove(id, name);
Review Comment:
[P2] Preserve numeric lookup identity after transient metadata failures
The new `retainEmptyIdentity=false` table callers reach this branch for
transient failures too: `ExternalDatabase.buildTableForInit()` catches
name-enumeration/connection exceptions and returns `null`. After the object and
names entries expire (while the parent DB remains hot), an ID lookup during a
metastore timeout therefore deletes the retained ID-to-name route.
`ExternalRowCountCache.loadRowCount()` retries through
`StatisticsUtil.findTable(catalogId, dbId, tableId)`, but every later numeric
lookup now returns empty before attempting a load, even after the service
recovers. A successful `SHOW TABLES`/names refresh only rebuilds the name map
and does not restore `idToName`; recovery requires a named object lookup or
registration. Previously the retained route allowed these retries to recover.
Distinguish transient loader failure from confirmed absence before discarding
this identity, and cover numeric lookup failure followed by service/name-cache
recovery.
--
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]