nandorKollar commented on code in PR #4646:
URL: https://github.com/apache/polaris/pull/4646#discussion_r3388874295
##########
runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalog.java:
##########
@@ -2494,10 +2495,14 @@ private void renameTableLike(
case BaseResult.ReturnStatus.ENTITY_NOT_FOUND:
throw new NotFoundException("Cannot rename %s to %s. %s does not
exist", from, to, from);
- // this is temporary. Should throw a special error that will be caught
and retried
+ // Transient concurrency conditions: surface as 503 so clients can
retry. We avoid 409
+ // here because the rename endpoint reserves 409 for "target already
exists" (handled by
+ // the ENTITY_ALREADY_EXISTS case above).
case BaseResult.ReturnStatus.TARGET_ENTITY_CONCURRENTLY_MODIFIED:
Review Comment:
> I agree, and it's very unfortunate, that we can't use 409. It describes
perfectly what happened, and it's retriable; but the Iceberg spec is very
opinionated and maps this code to the "already exists" case (and seems to imply
that the error is not retriable, in contradiction with the HTTP spec).
Exactly, this conflict is a non-resolvable conflict, which is normally not
solvable with a retry.
--
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]