adutra commented on code in PR #8857: URL: https://github.com/apache/iceberg/pull/8857#discussion_r1367436336
########## nessie/src/main/java/org/apache/iceberg/nessie/NessieIcebergClient.java: ########## @@ -323,28 +417,13 @@ public void renameTable(TableIdentifier from, TableIdentifier to) { throw new AlreadyExistsException("Table already exists: %s", to.name()); } - CommitMultipleOperationsBuilder operations = - getApi() - .commitMultipleOperations() - .commitMeta( - NessieUtil.buildCommitMetadata( - String.format("Iceberg rename table from '%s' to '%s'", from, to), - catalogOptions)) - .operation(Operation.Delete.of(NessieUtil.toKey(from))) - .operation(Operation.Put.of(NessieUtil.toKey(to), existingFromTable)); - try { - Tasks.foreach(operations) - .retry(5) - .stopRetryOn(NessieNotFoundException.class) - .throwFailureWhenFinished() - .onFailure((o, exception) -> refresh()) - .run( - ops -> { - Branch branch = ops.branch((Branch) getRef().getReference()).commit(); - getRef().updateReference(branch); - }, - BaseNessieClientServerException.class); + + commitRetry( Review Comment: I also modified the table operations in this class to use the new `commitRetry` method. One side-effect of that is that `NessieReferenceConflict` errors are not being retried anymore. As i voiced somewhere else already, I think conflicts have little to no chance of success when retried, so not only it's useless, but probably bad from a UX perspective, because it only delays the display of the error message to the user. But I'm happy to put things back as they were if someone disagrees. -- 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-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org