ayushtkn commented on code in PR #4934:
URL: https://github.com/apache/polaris/pull/4934#discussion_r3498367010


##########
runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalogHandler.java:
##########
@@ -1272,19 +1275,35 @@ public void commitTransaction(CommitTransactionRequest 
commitTransactionRequest)
           // Commit all accumulated changes for this table in a single atomic 
operation
           if (!currentMetadata.changes().isEmpty()) {
             tableOps.commit(baseMetadata, currentMetadata);
+            tableFileIOs.put(tableIdentifier, tableOps.io());
           }
 
           tableMetadataObjs.add(currentMetadata);
         });
 
-    // Commit the collected updates in a single atomic operation
+    // Extract newly written metadata locations from the buffered entity 
updates.
+    // We cannot use tableOps.current().metadataFileLocation() because 
requestRefresh()
+    // causes doRefresh() to read from the store where the entity hasn't been 
persisted yet.
+    // The pendingUpdates entities have the correct new location set by 
doCommit().
     List<EntityWithPath> pendingUpdates = 
transactionMetaStoreManager.getPendingUpdates();
+    List<Map.Entry<FileIO, String>> writtenMetadataFiles =

Review Comment:
   Sorry, I misunderstood initially, I have moved it under isSuccess, can you 
check if that is exactly what you asked for.



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

Reply via email to