gortiz commented on code in PR #14730:
URL: https://github.com/apache/pinot/pull/14730#discussion_r1899561754


##########
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotControllerLogger.java:
##########
@@ -224,18 +224,16 @@ public Response downloadLogFileFromInstance(
       if (authorization != null) {
         requestBuilder.addHeader(HttpHeaders.AUTHORIZATION, authorization);
       }
-      try (CloseableHttpResponse httpResponse = 
_fileUploadDownloadClient.getHttpClient()
-          .execute(requestBuilder.build())) {
-        if (httpResponse.getCode() >= 400) {
-          throw new 
WebApplicationException(IOUtils.toString(httpResponse.getEntity().getContent(), 
"UTF-8"),
-              Response.Status.fromStatusCode(httpResponse.getCode()));
-        }
-        Response.ResponseBuilder builder = Response.ok();
-        builder.entity(httpResponse.getEntity().getContent());
-        builder.contentLocation(uri);
-        builder.header(HttpHeaders.CONTENT_LENGTH, 
httpResponse.getEntity().getContentLength());
-        return builder.build();
+      CloseableHttpResponse httpResponse = 
_fileUploadDownloadClient.getHttpClient().execute(requestBuilder.build());

Review Comment:
   It is not clear to me why this may end up closing the resource for other 
instances and specially it is not clear to me who is closing this closeable now.



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