You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2022/03/03 03:40:07 UTC
[GitHub] [druid] AmatyaAvadhanula commented on a change in pull request #12298: Add config for lazy connections to mitigate overwhelming of Coordinator
AmatyaAvadhanula commented on a change in pull request #12298:
URL: https://github.com/apache/druid/pull/12298#discussion_r818288442
##########
File path: core/src/main/java/org/apache/druid/java/util/http/client/pool/ResourcePool.java
##########
@@ -177,7 +183,8 @@ private ImmediateCreationResourceHolder(
this.unusedResourceTimeoutMillis = unusedResourceTimeoutMillis;
this.resourceHolderList = new ArrayDeque<>();
- for (int i = 0; i < maxSize; ++i) {
+ final int initializationSize = eagerInitialization ? maxSize : 1;
+ for (int i = 0; i < initializationSize; ++i) {
Review comment:
It would create more connections on the go
##########
File path: core/src/main/java/org/apache/druid/java/util/http/client/HttpClientConfig.java
##########
@@ -118,6 +121,11 @@ public int getNumConnections()
return numConnections;
}
+ public boolean isEagerInitialization()
+ {
+ return eagerInitialization;
Review comment:
done
--
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@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org