Elffuss BraidHub

kikocis/java-driver public

Revert "JAVA-995: Defunct connection even if initializing."

This reverts commit 192bd21688dbae236fa88fff61427bc7e35a3260.

This change caused another race condition, that could lead to marking
a host down if protocol negotiation failed at startup. We're reverting
to the previous behavior which is less severe (as explained in the
ticket, the only impact is that a host could be marked down later than
expected). The connection shutdown sequence will be reeaxamined to
provide a better fix.
Changeset6ad0d047bddb1f39382481f10611d4e991332094e5ec99f5fa6db1baaa05f849
Authorolim7t <omichallat+github@gmail.com> · 2015-12-07 17:24 +01:00
Committerolim7t <omichallat+github@gmail.com> · 2015-12-07 17:29 +01:00
Parentsc8a66951a399

Browse the files at this changeset

2 files changed

modified changelog/README.md +0 −2
@@ -3,8 +3,6 @@
33 ### 2.0.13 (in progress)
44
55 - [bug] JAVA-994: Don't call on(Up|Down|Add|Remove) methods if Cluster is closed/closing.
6-- [bug] JAVA-995: Defunct connection even if initializing.
7-
86
97 ### 2.0.12
108
modified driver-core/src/main/java/com/datastax/driver/core/Connection.java +1 −1
@@ -1049,7 +1049,7 @@
10491049 public void operationComplete(ChannelFuture future) throws Exception {
10501050 // If we've closed the channel client side then we don't really want to defunct the connection, but
10511051 // if there is remaining thread waiting on us, we still want to wake them up
1052- if (isClosed()) {
1052+ if (!isInitialized || isClosed()) {
10531053 dispatcher.errorOutAllHandler(new TransportException(address, "Channel has been closed"));
10541054 // we still want to force so that the future completes
10551055 Connection.this.closeAsync().force();