abhioncbr commented on code in PR #13477:
URL: https://github.com/apache/pinot/pull/13477#discussion_r1653249539


##########
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotRunningQueryResource.java:
##########
@@ -124,6 +125,9 @@ public String cancelQuery(
           .setSocketTimeout(timeoutMs).build();
 
       CloseableHttpClient client = 
HttpClients.custom().setConnectionManager(_httpConnMgr)
+          // The `setSSLSocketFactory` has to be set after 
`setConnectionManager` due to the bug described here:
+          // 
https://github.com/apache/pinot/issues/13431#issuecomment-2178323975

Review Comment:
   Nit: Please don't mention the issue as a code comment. We can easily track 
this with the PR description. 



##########
pinot-common/src/main/java/org/apache/pinot/common/http/PoolingHttpClientConnectionManagerHelper.java:
##########
@@ -0,0 +1,42 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.pinot.common.http;
+
+import org.apache.http.config.Registry;
+import org.apache.http.config.RegistryBuilder;
+import org.apache.http.conn.socket.ConnectionSocketFactory;
+import org.apache.http.conn.socket.PlainConnectionSocketFactory;
+import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
+import org.apache.pinot.common.utils.tls.TlsUtils;
+import org.apache.pinot.spi.utils.CommonConstants;
+
+
+public class PoolingHttpClientConnectionManagerHelper {
+
+  private PoolingHttpClientConnectionManagerHelper() {
+  }
+
+  public static PoolingHttpClientConnectionManager createWithSocketFactory() {

Review Comment:
   Is it possible to add some unit tests for this new code? Thanks



##########
pinot-common/src/main/java/org/apache/pinot/common/http/MultiHttpRequest.java:
##########
@@ -109,7 +110,11 @@ public <T extends HttpRequestBase> 
CompletionService<MultiHttpRequestResponse> e
             .build(); // setting the socket
 
     HttpClientBuilder httpClientBuilder =
-        
HttpClients.custom().setConnectionManager(_connectionManager).setDefaultRequestConfig(defaultRequestConfig);
+        HttpClients.custom().setConnectionManager(_connectionManager)
+            // The `setSSLSocketFactory` has to be set after 
`setConnectionManager` due to the bug described here:
+            // 
https://github.com/apache/pinot/issues/13431#issuecomment-2178323975

Review Comment:
   Same comment as another place regarding the comment. 



-- 
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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to