danielcweeks commented on code in PR #12566: URL: https://github.com/apache/iceberg/pull/12566#discussion_r2012419084
########## aws/src/main/java/org/apache/iceberg/aws/s3/signer/S3V4RestSignerClient.java: ########## @@ -250,25 +251,28 @@ public SdkHttpFullRequest sign( } else { Map<String, String> responseHeaders = Maps.newHashMap(); Consumer<Map<String, String>> responseHeadersConsumer = responseHeaders::putAll; - S3SignResponse s3SignResponse = - httpClient() - .withAuthSession(authSession()) - .post( - endpoint(), - remoteSigningRequest, - S3SignResponse.class, - Map.of(), - ErrorHandlers.defaultErrorHandler(), - responseHeadersConsumer); - - signedComponent = - ImmutableSignedComponent.builder() - .headers(s3SignResponse.headers()) - .signedURI(s3SignResponse.uri()) - .build(); - - if (canBeCached(responseHeaders)) { - SIGNED_COMPONENT_CACHE.put(cacheKey, signedComponent); + try (RESTClient restClient = httpClient().withAuthSession(authSession())) { Review Comment: I would agree with @nastra here. The http client is registered with the catalog's closeable group and the lifecycle should track with the catalog. All the extra no-op try/catches are confusing and I don't think we should include them because that's not the intent (though it may make an IDE complain about unclosed resources). -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org