github-actions[bot] commented on code in PR #69299:
URL: https://github.com/apache/doris/pull/69299#discussion_r4321658993


##########
fe/fe-connector/fe-connector-iceberg/src/main/java/org/apache/doris/connector/iceberg/IcebergConnectorMetadata.java:
##########
@@ -424,26 +438,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)))) {

Review Comment:
   [P2] Use live existence checks for CREATE TABLE preflights
   
   The separate CREATE preflight in `PluginDrivenExternalCatalog.createTable` 
(lines 653 and 679) still uses `getTableHandle`, so it now accepts this cached 
positive proof. For example, configure the FE names/object cache TTL shorter 
than `meta.cache.iceberg.table.ttl-second`, read `db.t`, drop it externally, 
then issue CREATE after the FE entries expire. The local lookup reloads the 
absent name and returns null, but `remoteExists` remains true here: plain 
CREATE raises `ERR_TABLE_EXISTS_ERROR`, and CREATE IF NOT EXISTS returns 
success without creating the table. Previously the remote existence probe 
returned false and creation proceeded. This is distinct from the existing DROP 
IF EXISTS thread, whose consumer now uses the new live `tableExists` API. 
Migrate both CREATE-only existence probes to that API too.



-- 
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]

Reply via email to