rdblue commented on code in PR #7569:
URL: https://github.com/apache/iceberg/pull/7569#discussion_r1199829452


##########
core/src/main/java/org/apache/iceberg/rest/CatalogHandlers.java:
##########
@@ -361,4 +364,37 @@ private static TableMetadata commit(TableOperations ops, 
UpdateTableRequest requ
 
     return ops.current();
   }
+
+  /**
+   * This is a very simplistic approach that only validates the requirements 
for each table and does
+   * not do any other conflict detection. Therefore, it does not guarantee 
true transactional
+   * atomicity, which is left to the implementation details of a REST server.
+   */
+  public static void commitTransaction(Catalog catalog, 
CommitTransactionRequest request) {

Review Comment:
   I think that this method should check whether the underlying catalog 
implements `commitTransaction`. If it does, then it should delegate to the 
catalog. If not, it should throw an exception.
   
   The `CatalogHandlers` act as a reference implementation for the REST 
protocol, so I think it would be problematic if we included a method that took 
an atomic multi-table commit and implemented it as a sequence of individual 
commits.



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