You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "ankitsultana (via GitHub)" <gi...@apache.org> on 2023/06/12 20:58:23 UTC

[GitHub] [pinot] ankitsultana commented on a diff in pull request #10895: Add Support for Disabling Default User Agent for Http Client

ankitsultana commented on code in PR #10895:
URL: https://github.com/apache/pinot/pull/10895#discussion_r1227234145


##########
pinot-core/src/main/java/org/apache/pinot/server/realtime/ServerSegmentCompletionProtocolHandler.java:
##########
@@ -52,6 +53,7 @@ public class ServerSegmentCompletionProtocolHandler {
   private static final String HTTP_PROTOCOL = CommonConstants.HTTP_PROTOCOL;
 
   private static SSLContext _sslContext;
+  private static HttpClientConfig _httpClientConfig = HttpClientConfig.DEFAULT_HTTP_CLIENT_CONFIG;

Review Comment:
   So right now most of the member vars are stored in a static context in this class, and Pinot server calls `ServerSegmentCompletionProtocolHandler#init` on start-up to make sure everything is assigned some values.
   
   Without setting this to the default value, some of the UTs were failing because we were not initializing `ServerSegmentCompletionProtocolHandler` in them. So I had two options:
   
   1. Either initialize it everywhere in the test
   2. or go with a default value.
   
   I picked option-2. lmk if you see any concerns.



-- 
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-unsubscribe@pinot.apache.org

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


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