You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by xi...@apache.org on 2021/03/31 20:55:47 UTC

[incubator-pinot] branch fixing_http_connection_not_released_issue created (now 7013b8a)

This is an automated email from the ASF dual-hosted git repository.

xiangfu pushed a change to branch fixing_http_connection_not_released_issue
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git.


      at 7013b8a  Fixing the issue that multi-get doesn't release the http connection

This branch includes the following new commits:

     new 7013b8a  Fixing the issue that multi-get doesn't release the http connection

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[incubator-pinot] 01/01: Fixing the issue that multi-get doesn't release the http connection

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiangfu pushed a commit to branch fixing_http_connection_not_released_issue
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git

commit 7013b8a9d617c5dd8aebf6587345231ee3e6ebf4
Author: Xiang Fu <fx...@gmail.com>
AuthorDate: Wed Mar 31 13:55:18 2021 -0700

    Fixing the issue that multi-get doesn't release the http connection
---
 .../src/main/java/org/apache/pinot/common/http/MultiGetRequest.java   | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/pinot-common/src/main/java/org/apache/pinot/common/http/MultiGetRequest.java b/pinot-common/src/main/java/org/apache/pinot/common/http/MultiGetRequest.java
index 6bd69d9..ab657b2 100644
--- a/pinot-common/src/main/java/org/apache/pinot/common/http/MultiGetRequest.java
+++ b/pinot-common/src/main/java/org/apache/pinot/common/http/MultiGetRequest.java
@@ -100,8 +100,8 @@ public class MultiGetRequest {
     CompletionService<GetMethod> completionService = new ExecutorCompletionService<>(_executor);
     for (String url : urls) {
       completionService.submit(() -> {
+        GetMethod getMethod = new GetMethod(url);
         try {
-          GetMethod getMethod = new GetMethod(url);
           getMethod.getParams().setSoTimeout(timeoutMs);
           client.executeMethod(getMethod);
           return getMethod;
@@ -109,6 +109,8 @@ public class MultiGetRequest {
           // Log only exception type and message instead of the whole stack trace
           LOGGER.warn("Caught '{}' while executing GET on URL: {}", e.toString(), url);
           throw e;
+        } finally {
+          getMethod.releaseConnection();
         }
       });
     }

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org