saurabhd336 commented on code in PR #8971:
URL: https://github.com/apache/pinot/pull/8971#discussion_r911788164
##########
pinot-clients/pinot-java-client/src/main/java/org/apache/pinot/client/ConnectionFactory.java:
##########
@@ -28,7 +28,8 @@
* Creates connections to Pinot, given various initialization methods.
*/
public class ConnectionFactory {
- private static PinotClientTransport _defaultTransport;
+ private static volatile PinotClientTransport _defaultTransport;
Review Comment:
Ack
##########
pinot-clients/pinot-java-client/src/main/java/org/apache/pinot/client/ConnectionFactory.java:
##########
@@ -173,7 +174,11 @@ public static Connection fromHostList(Properties
properties, List<String> broker
private static PinotClientTransport getDefault() {
if (_defaultTransport == null) {
- _defaultTransport = new
JsonAsyncHttpPinotClientTransportFactory().buildTransport();
+ synchronized (TRANSPORT_LOCK) {
Review Comment:
This makes sense. Ack
--
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]