924060929 commented on code in PR #69299:
URL: https://github.com/apache/doris/pull/69299#discussion_r4373695242
##########
fe/fe-connector/fe-connector-iceberg/src/main/java/org/apache/doris/connector/iceberg/IcebergConnectorMetadata.java:
##########
@@ -455,26 +469,52 @@ private String loadTableComment(ConnectorSession session,
String dbName, String
@Override
public Optional<ConnectorTableHandle> getTableHandle(
ConnectorSession session, String dbName, String tableName) {
+ IcebergTableHandle handle = new IcebergTableHandle(dbName, tableName);
+ if (IcebergStatementScope.hasReadTable(session, dbName, tableName)
+ || (tableCache != null &&
tableCache.contains(TableIdentifier.of(dbName, tableName)))) {
+ return Optional.of(handle);
+ }
+ // Offline callers cannot retain a cache lease. Pure existence checks
use tableExists instead.
+ if (session == null || session.getStatementScope() ==
ConnectorStatementScope.NONE) {
+ return tableExists(session, dbName, tableName) ?
Optional.of(handle) : Optional.empty();
+ }
+ try {
+ // Loading proves existence and pins the same metadata used by
schema/snapshot/scan planning.
+ // Borrow through the existing generation-aware cache so
concurrent cold readers share one load.
+ executeAuthenticated(() -> resolveTableForRead(session, handle));
Review Comment:
Fixed in 3bde61a1ce7. DROP retains its live existence preflight and now
requests a DDL handle instead of the scan-planning read handle. Iceberg returns
an identifier-only DDL handle after checking live existence, so server-side
REST scan planning cannot block DROP or ALTER. Query reads still use the frozen
scan-capable handle path. Added a server-planned-table test that reproduces the
read-handle rejection and verifies DROP succeeds; the Iceberg (10) and generic
DDL routing (90) unit tests pass.
--
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]