3535 * reclaimed if the use of opened connections drops below the
3636 * configured threshold ({@link #getMinSimultaneousRequestsPerConnectionThreshold}).
3737 * <p>
38+ * Due to known issues with the current {@code ProtocolVersion#V2} pool implementation (see
39+ * <a href="https://datastax-oss.atlassian.net/browse/JAVA-419">JAVA-419</a>),
40+ * it is <b>strongly recommended</b> to use a fixed-size pool (core connections =
41+ * max connections).
42+ * The default values respect this (8 for local hosts, 2 for remote hosts).
43+ * <p>
3844 * <b>With {@code ProtocolVersion#V3} or above:</b>
3945 * the driver uses a single connection for each {@code LOCAL} or {@code REMOTE}
4046 * host. This connection can handle a larger amount of simultaneous requests,
@@ -49,8 +55,8 @@ public class PoolingOptions {
4955 private static final int DEFAULT_MIN_REQUESTS_PER_CONNECTION = 25 ;
5056 private static final int DEFAULT_MAX_REQUESTS_PER_CONNECTION = 100 ;
5157
52- private static final int DEFAULT_CORE_POOL_LOCAL = 2 ;
53- private static final int DEFAULT_CORE_POOL_REMOTE = 1 ;
58+ private static final int DEFAULT_CORE_POOL_LOCAL = 8 ;
59+ private static final int DEFAULT_CORE_POOL_REMOTE = 2 ;
5460
5561 private static final int DEFAULT_MAX_POOL_LOCAL = 8 ;
5662 private static final int DEFAULT_MAX_POOL_REMOTE = 2 ;
@@ -192,6 +198,11 @@ public int getCoreConnectionsPerHost(HostDistance distance) {
192198 * Sets the core number of connections per host.
193199 * <p>
194200 * This option is only used with {@code ProtocolVersion#V2} or below.
201+ * <p>
202+ * Due to known issues with the current pool implementation (see
203+ * <a href="https://datastax-oss.atlassian.net/browse/JAVA-419">JAVA-419</a>),
204+ * it is <b>strongly recommended</b> to use a fixed-size pool (core connections =
205+ * max connections).
195206 *
196207 * @param distance the {@code HostDistance} for which to set this threshold.
197208 * @param newCoreConnections the value to set
@@ -231,6 +242,11 @@ public int getMaxConnectionsPerHost(HostDistance distance) {
231242 * Sets the maximum number of connections per host.
232243 * <p>
233244 * This option is only used with {@code ProtocolVersion#V2} or below.
245+ * <p>
246+ * Due to known issues with the current pool implementation (see
247+ * <a href="https://datastax-oss.atlassian.net/browse/JAVA-419">JAVA-419</a>),
248+ * it is <b>strongly recommended</b> to use a fixed-size pool (core connections =
249+ * max connections).
234250 *
235251 * @param distance the {@code HostDistance} for which to set this threshold.
236252 * @param newMaxConnections the value to set
0 commit comments