zeroshade commented on issue #2443: URL: https://github.com/apache/iceberg-go/issues/2443#issuecomment-7046164256
Thanks @HotSushi and @AynSiddiqui. Confirmed, go ahead with the retry PR. A few notes: **Malformed lifetime:** being stricter than Java is fine. The key is still sent whenever `idempotency-key-lifetime` is present, as in #2492, but there are no keyed resends unless the value parses and is positive. Please call that difference from Java out in the docs. **Transport replay:** agreed, bound it to the same window. Some details that may help pick the mechanism: - `net/http` only replays on a reused connection that fails before the first response byte, and it replays right after that failure. The elapsed time to check against the window is just the first attempt's duration. - For a request with a body, the replay goes through `rewindBody` → `req.GetBody` in `transport.go`. 307/308 redirects in `client.go` call `GetBody` too. So a `GetBody` that returns an error once the window has passed, or right away when resends aren't allowed, stops both, and the transport returns the original error. - Requests without a body (the keyed DELETEs) never call `GetBody`. `isReplayable` accepts them on the `Idempotency-Key` header alone, so they need a separate answer. If there's no clean way to bound them, I'd rather document that gap than depend on unexported `net/http` behaviour, such as setting the header under a non-canonical key. **Caller scan keys:** agreed. `idempotencyHeaderValue` already rejects anything that isn't an RFC 4122 UUIDv7, so the embedded timestamp is reliable, and clamping future timestamps is right. To confirm how this ends up when the server doesn't advertise a lifetime: generated scan keys aren't sent, and caller-supplied keys are sent but never resent. Today's scan retry resends three times regardless, so please put that in `releases.md` next to the 408/429 change. -- 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]
