snazy commented on code in PR #8857:
URL: https://github.com/apache/iceberg/pull/8857#discussion_r1410760088
##########
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:
| retrying `NessieReferenceConflict` ... only delays the display of the
error message to the user
Agree. Not retrying those is fine IMO.
--
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]