kikocis/java-driver public
Changesets · Branches · Tags · Compare
| Changeset | 2f7ab0de2ec4b0684bcc1de3a90a0da7937dec5bd3dd1b23d5c1435df53e81d7 |
|---|---|
| Author | olim7t <omichallat+github@gmail.com> · 2014-12-22 11:30 +01:00 |
| Committer | olim7t <omichallat+github@gmail.com> · 2014-12-22 22:50 +01:00 |
| Parents | def037affef4 |
1 file changed
modified driver-core/src/main/java/com/datastax/driver/core/PoolingOptions.java +18 −2
| @@ -37,6 +37,12 @@ | ||
| 37 | 37 | * Each of these parameters can be separately set for {@code LOCAL} and |
| 38 | 38 | * {@code REMOTE} hosts ({@link HostDistance}). For {@code IGNORED} hosts, |
| 39 | 39 | * the default for all those settings is 0 and cannot be changed. |
| 40 | + * <p> | |
| 41 | + * Due to known issues with the current pool implementation (see | |
| 42 | + * <a href="https://datastax-oss.atlassian.net/browse/JAVA-419">JAVA-419</a>), | |
| 43 | + * it is <b>strongly recommended</b> to use a fixed-size pool (core connections = | |
| 44 | + * max connections). | |
| 45 | + * The default values respect this (8 for local hosts, 2 for remote hosts). | |
| 40 | 46 | */ |
| 41 | 47 | public class PoolingOptions { |
| 42 | 48 | |
| @@ -45,8 +51,8 @@ | ||
| 45 | 51 | private static final int DEFAULT_MIN_REQUESTS = 25; |
| 46 | 52 | private static final int DEFAULT_MAX_REQUESTS = 100; |
| 47 | 53 | |
| 48 | - private static final int DEFAULT_CORE_POOL_LOCAL = 2; | |
| 49 | - private static final int DEFAULT_CORE_POOL_REMOTE = 1; | |
| 54 | + private static final int DEFAULT_CORE_POOL_LOCAL = 8; | |
| 55 | + private static final int DEFAULT_CORE_POOL_REMOTE = 2; | |
| 50 | 56 | |
| 51 | 57 | private static final int DEFAULT_MAX_POOL_LOCAL = 8; |
| 52 | 58 | private static final int DEFAULT_MAX_POOL_REMOTE = 2; |
| @@ -169,6 +175,11 @@ | ||
| 169 | 175 | |
| 170 | 176 | /** |
| 171 | 177 | * Sets the core number of connections per host. |
| 178 | + * <p> | |
| 179 | + * Due to known issues with the current pool implementation (see | |
| 180 | + * <a href="https://datastax-oss.atlassian.net/browse/JAVA-419">JAVA-419</a>), | |
| 181 | + * it is <b>strongly recommended</b> to use a fixed-size pool (core connections = | |
| 182 | + * max connections). | |
| 172 | 183 | * |
| 173 | 184 | * @param distance the {@code HostDistance} for which to set this threshold. |
| 174 | 185 | * @param newCoreConnections the value to set |
| @@ -204,6 +215,11 @@ | ||
| 204 | 215 | |
| 205 | 216 | /** |
| 206 | 217 | * Sets the maximum number of connections per host. |
| 218 | + * <p> | |
| 219 | + * Due to known issues with the current pool implementation (see | |
| 220 | + * <a href="https://datastax-oss.atlassian.net/browse/JAVA-419">JAVA-419</a>), | |
| 221 | + * it is <b>strongly recommended</b> to use a fixed-size pool (core connections = | |
| 222 | + * max connections). | |
| 207 | 223 | * |
| 208 | 224 | * @param distance the {@code HostDistance} for which to set this threshold. |
| 209 | 225 | * @param newMaxConnections the value to set |