iceberg
iceberg copied to clipboard
Core: Make CatalogHandlers.commit public
Externalize TableMetadata's commit method so that the TableMetadata class can be used in custom REST catalog implementations
I believe the purpose was that
CatalogHandlers.commit(..)
should only be used throughCatalogHandlers.updateTable(...)
. Is there a particular issue that prevents you from going throughCatalogHandlers.updateTable(...)
?
AFAIU updateTable recieves a single UpdateTableRequest, and is used in the REST context to handle an UPDATE_TABLE
request.
On the other hand the COMMIT_TRANSACTION
request receives a list of UpdateTableRequest and preforms updates on all requests as an atomic operation.
I don't see how this can be achieved using updateTable
@N-o-Z can you elaborate please what exactly you're trying to achieve?
Are you trying to implement multi-table commits on the server?
For COMMIT_TRANSACTION
the approach is very simplistic and does not guarantee true transactional behavior as indicated in https://github.com/apache/iceberg/blob/9dcf8dbc4285ad4ab4c1975562bf93fb04747cdd/core/src/test/java/org/apache/iceberg/rest/RESTCatalogAdapter.java#L479-L507.
@N-o-Z can you elaborate please what exactly you're trying to achieve? Are you trying to implement multi-table commits on the server? For
COMMIT_TRANSACTION
the approach is very simplistic and does not guarantee true transactional behavior as indicated inhttps://github.com/apache/iceberg/blob/9dcf8dbc4285ad4ab4c1975562bf93fb04747cdd/core/src/test/java/org/apache/iceberg/rest/RESTCatalogAdapter.java#L479-L507
.
I wanted to use this as an intermediate solution before implementing a more robust transactional functionality. But if you think this is not a good idea, feel free to close this PR