kikocis/java-driver public
Changesets · Branches · Tags · Compare
| Changeset | e101ab366c7ba1b064479cece76ed1118f668d2a5c1cf1e13a546f1f1c1b5fa1 |
|---|---|
| Author | Alexandre Dutra <alexdut@gmail.com> · 2015-06-11 15:01 +02:00 |
| Committer | Alexandre Dutra <alexdut@gmail.com> · 2015-06-11 15:01 +02:00 |
| Parents | 5d6cb1282caa, 294bbacafffa |
2 files changed
modified changelog/README.md +2 −0
| @@ -2,6 +2,8 @@ | ||
| 2 | 2 | |
| 3 | 3 | ### 2.0.11 (in progress) |
| 4 | 4 | |
| 5 | +- [bug] Fix SpeculativeExecutionPolicy.init() and close() are never called (JAVA-796) | |
| 6 | + | |
| 5 | 7 | Merged from 2.0.10_fixes branch: |
| 6 | 8 | |
| 7 | 9 | - [improvement] Use Netty's pooled ByteBufAllocator by default (JAVA-756) |
modified driver-core/src/main/java/com/datastax/driver/core/Cluster.java +4 −0
| @@ -1243,6 +1243,8 @@ | ||
| 1243 | 1243 | // Now that the control connection is ready, we have all the information we need about the nodes (datacenter, |
| 1244 | 1244 | // rack...) to initialize the load balancing policy |
| 1245 | 1245 | loadBalancingPolicy().init(Cluster.this, contactPointHosts); |
| 1246 | + speculativeRetryPolicy().init(Cluster.this); | |
| 1247 | + | |
| 1246 | 1248 | for (Host host : downContactPointHosts) { |
| 1247 | 1249 | loadBalancingPolicy().onDown(host); |
| 1248 | 1250 | for (Host.StateListener listener : listeners) |
| @@ -1379,6 +1381,8 @@ | ||
| 1379 | 1381 | if (loadBalancingPolicy instanceof CloseableLoadBalancingPolicy) |
| 1380 | 1382 | ((CloseableLoadBalancingPolicy)loadBalancingPolicy).close(); |
| 1381 | 1383 | |
| 1384 | + speculativeRetryPolicy().close(); | |
| 1385 | + | |
| 1382 | 1386 | AddressTranslater translater = configuration.getPolicies().getAddressTranslater(); |
| 1383 | 1387 | if (translater instanceof CloseableAddressTranslater) |
| 1384 | 1388 | ((CloseableAddressTranslater)translater).close(); |