Browse files

Avoid losing a host when adding to retry service #439

  • Loading branch information...
1 parent db74f37 commit 7055e9f680a1f8b0bc970e17fa1393dc5854cee8 @patricioe patricioe committed Mar 17, 2012
View
1 CHANGELOG
@@ -11,6 +11,7 @@ See object-mapper/CHANGELOG for HOM specifics
Made Composite Serializable
Added Composite to TypeInferringSerializer
Add start key to KeyIterator #419
+Fix losing a host during Retry Down host service #439
1.0-3
=====
View
5 core/src/main/java/me/prettyprint/cassandra/connection/CassandraHostRetryService.java
@@ -72,8 +72,9 @@ public void add(final CassandraHost cassandraHost) {
@Override
public void run() {
if(downedHostQueue.contains(cassandraHost) && verifyConnection(cassandraHost)) {
- connectionManager.addCassandraHost(cassandraHost);
- downedHostQueue.remove(cassandraHost);
+ if (connectionManager.addCassandraHost(cassandraHost)) {
+ downedHostQueue.remove(cassandraHost);
+ }
return;
}
}

0 comments on commit 7055e9f

Please sign in to comment.