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


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/IcebergExternalMetaCache.java:
##########
@@ -133,7 +143,32 @@ IcebergSnapshotEntryKey.class, 
IcebergSnapshotCacheValue.class, defaultEntryCach
 
     public Table getIcebergTable(ExternalTable dorisTable) {
         NameMapping nameMapping = dorisTable.getOrBuildNameMapping();
-        return 
tableEntry.get(nameMapping.getCtlId()).get(nameMapping).getIcebergTable();
+        IcebergTableCacheValue.Lease lease = statementLease(nameMapping);
+        if (lease != null) {
+            return lease.getIcebergTable();

Review Comment:
   [P1] Keep property updates on the caller's catalog generation
   
   `IcebergMetadataOps.updateTableProperties()` is the only table mutation that 
still calls `getIcebergTable()` instead of `getWritableIcebergTable(dorisTable, 
this)`. If `ExternalCatalog` enters G1 metadataOps and a reset completes before 
this lookup, this read path can return a statement-pinned or reloaded G2 table 
and then commit it through G1's captured authenticator; the inverse mismatch is 
possible with an existing G1 statement lease. Route this DDL through the 
expected-ops writable acquisition so the race fails/retries, and add a 
reset-barrier test.



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