924060929 commented on code in PR #69806:
URL: https://github.com/apache/doris/pull/69806#discussion_r4409895603
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/plugin/PluginDrivenExternalTable.java:
##########
@@ -119,11 +121,24 @@ public PluginDrivenExternalTable(long id, String name,
String remoteName,
*/
public Optional<ConnectorTableHandle> resolveConnectorTableHandle(
Review Comment:
Fixed in 4e37febb40c6. System-table resolution now calls the real
source-table resolver, preserving the synthetic handle while using the shared
source identity for repair. A pre-handle MetadataRead also guards system-handle
conversion and inherited schema reads. Tests cover a source dropped between
discovery/resolution and absence discovered during system-handle/schema
loading; cleanup targets the base table, not the transient $ name.
Validation: 310 focused unit cases passed across 15 classes; FE build and
Checkstyle passed. Controlled providers, not a live external-service
integration run.
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/plugin/PluginDrivenExternalTable.java:
##########
@@ -139,14 +154,31 @@ public Optional<ConnectorTableHandle>
resolveConnectorTableHandle(
}
}
});
- String dbName = db != null ? db.getRemoteName() : "";
- Optional<ConnectorTableHandle> handle =
metadata.getTableHandle(session, dbName, getRemoteName());
- // A view has no table handle. Check live view existence before
treating an empty handle as a
- // dropped table; the cached isView flag can outlive a remote view
deletion.
- if (!handle.isPresent() && !metadata.viewExists(session, dbName,
getRemoteName())) {
- observation.ifPresent(Runnable::run);
Review Comment:
Fixed in 4e37febb40c6. A query-local MetadataRead retains the observation
captured BEFORE resolving the handle across MVCC
snapshot/time-travel/schema/partition/freshness reads, deferred partition
loaders, and scan column reads. It does not reacquire permission after
obtaining an old handle. Regression cases cover post-handle drop, delayed
same-name recreation, metadata-only refresh during handle resolution and after
scan creation. The no-table-cache Iceberg adapter test independently verifies
the SDK can resolve a handle and subsequently report typed snapshot absence.
Query TVFs retain their existing unobserved path because they own no shared FE
lookup identity.
Validation: 310 focused unit cases passed across 15 classes; FE build and
Checkstyle passed. Controlled providers, not a live external-service
integration run.
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/plugin/PluginDrivenExternalTable.java:
##########
@@ -894,7 +932,8 @@ public Optional<String> getShowCreateTableDdl() {
if (!handleOpt.isPresent()) {
return Optional.empty();
}
- return metadata.renderShowCreateTableDdl(session, handleOpt.get());
+ return readConnectorMetadata(observeConnectorTableLookup(connector),
session, metadata,
+ () -> metadata.renderShowCreateTableDdl(session,
handleOpt.get()));
}
Review Comment:
No change planned for this suggestion. A valid connector cache hit is not an
observed provider-absence signal: serving it until the configured TTL or
explicit invalidation is intentional existing behavior.
IcebergConnectorMetadataTest.getTableCommentIsMemoizedAcrossQueriesWhenCommentCachePresent
explicitly requires repeated display reads to share one provider load. Probing
existence or invalidating before every cached comment would change that
freshness/performance contract and add remote work to information_schema/SHOW
TABLE STATUS. This PR repairs a stale shared identity AFTER an actual read
confirms absence; it preserves cache TTLs and ordinary cache hits. Actual
confirmed comment misses still reach the guarded repair path. This suggestion
is outside that fix's scope.
Validation: 310 focused unit cases passed across 15 classes; FE build and
Checkstyle passed. Controlled providers, not a live external-service
integration run.
--
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]