924060929 commented on code in PR #69629:
URL: https://github.com/apache/doris/pull/69629#discussion_r4384897081
##########
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:
Fixed in fbfe7c684926. Moved the guard to the common unlocked
getBasePaimonTable() load, so status/comment and other base readers use the
retained lookup observation. testStatusCommentMissingBaseTableRepairsLookup
covers getComment() failing first for both implicit and explicit main
identifiers.
Validation: 225 selected FE tests passed (the embedded-FE port collision was
cleared by a targeted retry); build.sh --fe with UI disabled and Checkstyle
passed. SDK absence cases are deterministic unit tests, not a live-service
integration claim.
##########
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:
Fixed in fbfe7c684926. Recognize NoSuchViewException independently of
NoSuchTableException. testStatusCommentMissingViewRepairsLookup exercises the
retained view -> getComment() -> properties() -> missing view path and verifies
repair and original-exception propagation.
Validation: 225 selected FE tests passed (the embedded-FE port collision was
cleared by a targeted retry); build.sh --fe with UI disabled and Checkstyle
passed. SDK absence cases are deterministic unit tests, not a live-service
integration claim.
--
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]