Elffuss BraidHub

kikocis/java-driver public

Ensure SpeculativeExecutionPolicy.init() and close() get called (JAVA-796)
Changeset294bbacafffa1fc43512787f1ebed82a3e5e205974a5925cc969c8dbabfcce52
Authortommystendahl <tommy.stendahl@ericsson.com> · 2015-06-01 11:17 +02:00
Committertommy stendahl <tommy.stendahl@ericsson.com> · 2015-06-09 15:10 +02:00
Parents5d6cb1282caa

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();