You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "nastra (via GitHub)" <gi...@apache.org> on 2023/04/06 09:42:15 UTC

[GitHub] [iceberg] nastra commented on a diff in pull request #7283: Bump Nessie to 0.56.0

nastra commented on code in PR #7283:
URL: https://github.com/apache/iceberg/pull/7283#discussion_r1159547571


##########
nessie/src/main/java/org/apache/iceberg/nessie/NessieTableOperations.java:
##########
@@ -152,6 +160,9 @@ protected void doCommit(TableMetadata base, TableMetadata metadata) {
       client.commitTable(base, metadata, newMetadataLocation, table, key);
       delete = false;
     } catch (NessieConflictException ex) {
+      if (ex instanceof NessieReferenceConflictException) {
+        handleReferenceConflictException((NessieReferenceConflictException) ex);

Review Comment:
   threading through the code one wouldn't immediately expect `handleReferenceConflictException` to throw an exception. I think it would be better if `handleReferenceConflictException` would return `Optional<RuntimeException>`. 
   Then the call in the `catch` clause could be `throw handleReferenceConflictException(ex).orElseGet(() -> new CommitFailedException(..))`.
   



-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org