HotSushi commented on issue #4290:
URL: 
https://github.com/apache/iceberg-python/issues/4290#issuecomment-6996359911

   Thanks for @YuangGao @Fokko for landing 
[#4310](https://github.com/apache/iceberg-python/pull/4310). One follow-up on 
the lifetime bound, since the PR description says it isn't needed.
   
   The bound matters most when the server is overloaded. An overloaded server 
answers with 503 plus Retry-After. urllib3 honors that header by default and 
sleeps for the full value with no cap (backoff_max only applies to backoff). So 
with idempotency-key-lifetime: PT5M, a single Retry-After: 600 sends the retry 
after the server may have dropped the key.
   
   A keyed retry outside the window is dangerous:
   1. The first commit lands, but the response is lost.
   2. The client retries after the window with the same key.
   3. The server no longer has the key, so it treats the retry as a new request 
and applies the mutation a second time.
   
   That's a duplicate commit and corrupted table state. The key exists to 
prevent exactly that. The spec covers it too: "Clients SHOULD NOT reuse an 
Idempotency-Key after this window elapses." Java enforces it in 
ExponentialHttpRequestRetryStrategy (apache/iceberg#18070).
   
   I'll file a follow-up issue to bound keyed retries, including Retry-After 
sleeps, to the advertised lifetime.


-- 
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]

Reply via email to