github-actions[bot] commented on code in PR #69629:
URL: https://github.com/apache/doris/pull/69629#discussion_r4384658702
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/paimon/PaimonExternalTable.java:
##########
@@ -506,8 +521,10 @@ null, getCatalog().getName(),
key.getNameMapping().getLocalDbName(),
@Override
public Optional<SchemaCacheValue> getSchemaCacheValue() {
- return Optional.of(getPaimonSchemaCacheValue(
- MvccUtil.getSnapshotForTableMetadataFromContext(this)));
+ return withMissingTableRepair(() -> {
Review Comment:
[P2] Route Paimon status comment reads through repair
Warm `SHOW TABLES FROM ctl.db`, drop a listed Paimon table remotely while
its independent engine table entry is cold (or use
`meta.cache.paimon.table.ttl-second=0`), then run `SHOW TABLE STATUS FROM
ctl.db` first. That command queries `information_schema.tables`;
`FrontendServiceImpl.listTableStatus()` constructs tables from cached
membership and unconditionally calls `PaimonExternalTable.getComment()` ->
`getBasePaimonTable()`. This reaches `PaimonTableLoader` and throws the
definite `Catalog.TableNotExistException` without entering any of these
schema/snapshot wrappers. The service catches it around the entire loop, so
names/object/ID remain stale and repeated status queries keep returning partial
rows, potentially hiding valid siblings. Guard the comment read (or a common
unlocked table-load boundary) and add a STATUS-first remote-drop test. This is
distinct from the existing OPTIONS-fence finding: status reads never load a
statement snapshot.
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/ExternalTable.java:
##########
@@ -393,6 +394,31 @@ public Optional<ColumnStatistic> getColumnStatistic(String
colName) {
return Optional.empty();
}
+ /** Only table-level remote reads use this seam; partition misses and
arbitrary failures do not repair names. */
+ protected <R> R withMissingTableRepair(Supplier<R> read) {
+ // Metadata validators can enter a schema read under this monitor.
Repair only after
+ // an outer unlocked entry point has unwound it, preserving catalog ->
table lock order.
+ if (Thread.holdsLock(this)) {
+ return read.get();
+ }
+ Optional<Runnable> observation = db.observeTableLookup(this);
+ try {
+ return read.get();
+ } catch (RuntimeException failure) {
+ Throwable cause = failure;
+ while (cause != null) {
+ if (cause instanceof
org.apache.hadoop.hive.metastore.api.NoSuchObjectException
+ || cause instanceof
org.apache.iceberg.exceptions.NoSuchTableException
Review Comment:
[P2] Recognize missing Iceberg views in shared lookup repair
Iceberg's `listTableNamesFromRemote()` explicitly includes views in the same
lookup cache, but `NoSuchViewException` is a sibling of `NoSuchTableException`,
so this condition misses definite view absence. For a REST catalog, set
`meta.cache.iceberg.view.ttl-second=0`, warm a view with `SHOW TABLES` and
`SHOW TABLE STATUS`, drop it remotely, then request STATUS first. The retained
`isView=true` makes `getComment()` enter the newly guarded `properties()` view
branch; `getIcebergView()` -> `loadView()` preserves `NoSuchViewException` in
its cause chain ([Iceberg 1.11.0 view error
handler](https://github.com/apache/iceberg/blob/apache-iceberg-1.11.0/core/src/main/java/org/apache/iceberg/rest/ErrorHandlers.java#L244-L256)).
No repair action runs, leaving stale names/object/ID; the status service
catches the failure around the whole loop and repeatedly returns partial
results. Include definite missing views for this shared lookup identity and add
a dropped-view 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]