Elffuss BraidHub

kikocis/java-driver public

Merge pull request #362 from tommystendahl/patch-2

JAVA-796: Call SpeculativeExecutionPolicy.init() and close()
Changesete101ab366c7ba1b064479cece76ed1118f668d2a5c1cf1e13a546f1f1c1b5fa1
AuthorAlexandre Dutra <alexdut@gmail.com> · 2015-06-11 15:01 +02:00
CommitterAlexandre Dutra <alexdut@gmail.com> · 2015-06-11 15:01 +02:00
Parents5d6cb1282caa, 294bbacafffa

Browse the files at this changeset

2 files changed

modified changelog/README.md +2 −0
@@ -2,6 +2,8 @@
22
33 ### 2.0.11 (in progress)
44
5+- [bug] Fix SpeculativeExecutionPolicy.init() and close() are never called (JAVA-796)
6+
57 Merged from 2.0.10_fixes branch:
68
79 - [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 @@
12431243 // Now that the control connection is ready, we have all the information we need about the nodes (datacenter,
12441244 // rack...) to initialize the load balancing policy
12451245 loadBalancingPolicy().init(Cluster.this, contactPointHosts);
1246+ speculativeRetryPolicy().init(Cluster.this);
1247+
12461248 for (Host host : downContactPointHosts) {
12471249 loadBalancingPolicy().onDown(host);
12481250 for (Host.StateListener listener : listeners)
@@ -1379,6 +1381,8 @@
13791381 if (loadBalancingPolicy instanceof CloseableLoadBalancingPolicy)
13801382 ((CloseableLoadBalancingPolicy)loadBalancingPolicy).close();
13811383
1384+ speculativeRetryPolicy().close();
1385+
13821386 AddressTranslater translater = configuration.getPolicies().getAddressTranslater();
13831387 if (translater instanceof CloseableAddressTranslater)
13841388 ((CloseableAddressTranslater)translater).close();