rdblue commented on code in PR #14196:
URL: https://github.com/apache/iceberg/pull/14196#discussion_r2529326870
##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -1781,13 +1880,19 @@ paths:
406:
$ref: '#/components/responses/UnsupportedOperationResponse'
409:
- description: Conflict - The target identifier to rename to already
exists as a table or view
+ description: |
+ Conflict - Multiple conflict scenarios possible:
+ - The target identifier to rename to already exists as a table or
view
+ - A request with the same Idempotency-Key is already in progress
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorModel'
- example:
- $ref: '#/components/examples/ViewAlreadyExistsError'
+ examples:
+ NamespaceAlreadyExists:
+ $ref: '#/components/examples/ViewAlreadyExistsError'
+ IdempotencyInProgress:
Review Comment:
I'm not sure that a 409 is the right status in that case. 409 is going to be
interpreted by the client as a commit conflict, which will throw
`CommitFailedException` when updating a table. That will typically cause the
client to retry the commit by writing a new manifest list and then send another
request with different content. If the retries have been exhausted, then it
will cause the client to fail even though the commit state is actually unknown
(because the other request is in flight).
It sounds like what we want instead is a response to signal to the client to
retry the original request (with the same content and idempotency key) a little
later. That would work like a 429 / "backoff" from S3. We just removed using
503 / ServiceUnavailableException that used to be for that purpose so we will
need to consider how to do this if you want it to be possible. Another option
is to force the service to wait to respond until the in-flight request either
succeeds or fails.
--
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]