HotSushi commented on code in PR #18070:
URL: https://github.com/apache/iceberg/pull/18070#discussion_r4074464884
##########
core/src/main/java/org/apache/iceberg/rest/HTTPClient.java:
##########
@@ -164,6 +169,26 @@ public HTTPClient withAuthSession(AuthSession session) {
return new HTTPClient(this, session);
}
+ @VisibleForTesting
+ static Duration parseKeyLifetime(String lifetime) {
+ if (lifetime == null) {
+ return null;
+ }
+ try {
+ Duration parsed = Duration.parse(lifetime);
+ if (parsed.isZero()
+ || parsed.isNegative()
+ || parsed.compareTo(Duration.ofMillis(Long.MAX_VALUE)) > 0) {
+ LOG.warn("Ignoring out-of-range idempotency-key lifetime: {}",
lifetime);
+ return null;
Review Comment:
Adopted. Negative windows are spec-incompliant (strict ISO-8601 are
unsigned) but still get parsed.
No-retries are still best to deal with those.
--
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]