From 3e4a93685e3eff746eb507c1df72b524d04d281e Mon Sep 17 00:00:00 2001 From: Zoltan Haindrich Date: Fri, 9 Oct 2026 13:21:16 +0200 Subject: [PATCH] disable-adaptive --- docs/configuration/index.md | 4 ++-- .../java/util/http/client/HttpClientConfig.java | 2 +- .../druid/guice/http/DruidHttpClientConfig.java | 2 +- .../guice/http/DruidHttpClientConfigTest.java | 14 +++++++------- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/configuration/index.md b/docs/configuration/index.md index f46f919e4546..ee79e7c7b2fb 100644 --- a/docs/configuration/index.md +++ b/docs/configuration/index.md @@ -705,7 +705,7 @@ All Druid components can communicate with each other over HTTP. |`druid.global.http.clientConnectTimeout`|Connect timeout (in milliseconds) for the HTTP client used to forward management API requests between Druid services. On the Router, this covers forwarding management API calls to the Coordinator or Overlord. On the Coordinator, this covers proxying `/druid/indexer/*` requests to the Overlord (when they run as separate processes). Does not affect Router query proxying to Brokers (see `druid.router.http.clientConnectTimeout`) or direct RPC connections between services (see `connectTimeout`).|500| |`druid.global.http.connectTimeout`|Connect timeout for the HTTP client used for most direct RPC between Druid services. This covers, among other things, Overlord-to-task and supervisor-to-task calls in the indexing service, Coordinator lookup management, dynamic config sync between services, MSQ tasks reading from data servers, and general Coordinator/Overlord/Broker service clients. Does not affect Broker-to-Historical query dispatch (see `druid.broker.http.connectTimeout`) or request forwarding (see `clientConnectTimeout`).|`PT10S`| |`druid.global.http.allocator`|Netty memory allocator used by the direct-RPC HTTP client. Accepts `adaptive` (adaptive between `pooled` and `unpooled` based on load), `pooled`, or `unpooled`.|`adaptive`| -|`druid.global.http.poolImplementation`|How the connection pool tracks demand, never exceeding `numConnections` either way. With `adaptive`, a request discards every stale or broken connection it walks past and opens a new one only once none is left, so the pool falls back to the number of connections the traffic actually needs. With `retaining`, the pool holds on to every connection it has opened, replacing a stale or broken one by a fresh one, one for one, so it stays at its high-water mark.|`adaptive`| +|`druid.global.http.poolImplementation`|How the connection pool tracks demand, never exceeding `numConnections` either way. With `adaptive`, a request discards every stale or broken connection it walks past and opens a new one only once none is left, so the pool falls back to the number of connections the traffic actually needs. With `retaining`, the pool holds on to every connection it has opened, replacing a stale or broken one by a fresh one, one for one, so it stays at its high-water mark.|`retaining`| ### Common endpoints configuration @@ -1857,7 +1857,7 @@ client has the following configuration options. |`druid.broker.http.numMaxThreads`|`Maximum number of I/O worker threads|(number of cores) * 3 / 2 + 1`| |`druid.broker.http.connectTimeout`|Connect timeout for the HTTP client the Broker uses to dispatch queries to Historical and real-time processes.|`PT10S`| |`druid.broker.http.allocator`|Netty memory allocator used by the direct-RPC HTTP client. Accepts `adaptive` (adaptive between `pooled` and `unpooled` based on load), `pooled`, or `unpooled`.|`adaptive`| -|`druid.broker.http.poolImplementation`|How the connection pool tracks demand, never exceeding `numConnections` either way. With `adaptive`, a query discards every stale or broken connection it walks past and opens a new one only once none is left, so the pool falls back to the number of connections the traffic actually needs. With `retaining`, the pool holds on to every connection it has opened, replacing a stale or broken one by a fresh one, one for one, so it stays at its high-water mark.|`adaptive`| +|`druid.broker.http.poolImplementation`|How the connection pool tracks demand, never exceeding `numConnections` either way. With `adaptive`, a query discards every stale or broken connection it walks past and opens a new one only once none is left, so the pool falls back to the number of connections the traffic actually needs. With `retaining`, the pool holds on to every connection it has opened, replacing a stale or broken one by a fresh one, one for one, so it stays at its high-water mark.|`retaining`| ##### Retry policy diff --git a/processing/src/main/java/org/apache/druid/java/util/http/client/HttpClientConfig.java b/processing/src/main/java/org/apache/druid/java/util/http/client/HttpClientConfig.java index de650ff92af8..a2aaf420bfb3 100644 --- a/processing/src/main/java/org/apache/druid/java/util/http/client/HttpClientConfig.java +++ b/processing/src/main/java/org/apache/druid/java/util/http/client/HttpClientConfig.java @@ -194,7 +194,7 @@ public static class Builder { private int numConnections = 1; private boolean eagerInitialization = true; - private ResourcePool.Implementation poolImplementation = ResourcePool.Implementation.ADAPTIVE; + private ResourcePool.Implementation poolImplementation = ResourcePool.Implementation.RETAINING; private SSLContext sslContext = null; private HttpClientProxyConfig proxyConfig = null; private Duration readTimeout = null; diff --git a/server/src/main/java/org/apache/druid/guice/http/DruidHttpClientConfig.java b/server/src/main/java/org/apache/druid/guice/http/DruidHttpClientConfig.java index a9d4847d4f02..0caaf4406c15 100644 --- a/server/src/main/java/org/apache/druid/guice/http/DruidHttpClientConfig.java +++ b/server/src/main/java/org/apache/druid/guice/http/DruidHttpClientConfig.java @@ -75,7 +75,7 @@ public class DruidHttpClientConfig private Boolean eagerInitialization = null; @JsonProperty - private ResourcePool.Implementation poolImplementation = ResourcePool.Implementation.ADAPTIVE; + private ResourcePool.Implementation poolImplementation = ResourcePool.Implementation.RETAINING; @JsonProperty private long clientConnectTimeout = TimeUnit.MILLISECONDS.toMillis(500); diff --git a/server/src/test/java/org/apache/druid/guice/http/DruidHttpClientConfigTest.java b/server/src/test/java/org/apache/druid/guice/http/DruidHttpClientConfigTest.java index 70b0dec5b5a4..70a45375fb6f 100644 --- a/server/src/test/java/org/apache/druid/guice/http/DruidHttpClientConfigTest.java +++ b/server/src/test/java/org/apache/druid/guice/http/DruidHttpClientConfigTest.java @@ -38,18 +38,18 @@ public class DruidHttpClientConfigTest private static final String PROPERTY_BASE = "druid.broker.http"; @Test - public void testPoolImplementationDefaultsToAdaptive() + public void testPoolImplementationDefaultsToRetaining() { - Assertions.assertEquals(ResourcePool.Implementation.ADAPTIVE, configure(new Properties()).getPoolImplementation()); + Assertions.assertEquals(ResourcePool.Implementation.RETAINING, configure(new Properties()).getPoolImplementation()); } @Test - public void testPoolImplementationCanBeSwitchedBackToRetaining() + public void testPoolImplementationCanBeSwitchedToAdaptive() { final Properties properties = new Properties(); - properties.setProperty(PROPERTY_BASE + ".poolImplementation", "retaining"); + properties.setProperty(PROPERTY_BASE + ".poolImplementation", "adaptive"); - Assertions.assertEquals(ResourcePool.Implementation.RETAINING, configure(properties).getPoolImplementation()); + Assertions.assertEquals(ResourcePool.Implementation.ADAPTIVE, configure(properties).getPoolImplementation()); } /** @@ -59,9 +59,9 @@ public void testPoolImplementationCanBeSwitchedBackToRetaining() public void testPoolImplementationIsNotCaseSensitive() { final Properties properties = new Properties(); - properties.setProperty(PROPERTY_BASE + ".poolImplementation", "RETAINING"); + properties.setProperty(PROPERTY_BASE + ".poolImplementation", "ADAPTIVE"); - Assertions.assertEquals(ResourcePool.Implementation.RETAINING, configure(properties).getPoolImplementation()); + Assertions.assertEquals(ResourcePool.Implementation.ADAPTIVE, configure(properties).getPoolImplementation()); } /**