Elffuss BraidHub

kikocis/java-driver public

Don't check rpc_address for control host (JAVA-546).
Changeset9aa18df023505c1e36b0e53595cdb85f6798d2c4db82a2fccfd6ca7594382c5d
Authorolim7t <omichallat+github@gmail.com> · 2014-11-18 16:23 +01:00
Committerolim7t <omichallat+github@gmail.com> · 2014-11-27 10:37 +01:00
Parentsbb694ea629e2

Browse the files at this changeset

2 files changed

modified driver-core/CHANGELOG.rst +1 −0
@@ -7,6 +7,7 @@
77 - [improvement] Shade Netty dependency (JAVA-538)
88 - [improvement] Target schema refreshes more precisely (JAVA-543)
99 - [new feature] Add AddressTranslater for EC2 multi-region deployment (JAVA-518)
10+- [bug] Don't check rpc_address for control host (JAVA-546)
1011
1112
1213 2.0.8:
modified driver-core/src/main/java/com/datastax/driver/core/ControlConnection.java +4 −1
@@ -441,7 +441,10 @@
441441 logger.error("No row found for host {} in {}'s peers system table. {} will be ignored.", host.getAddress(), c.address, host.getAddress());
442442 return false;
443443 }
444- } else if (row.getInet("rpc_address") == null) {
444+ // Ignore hosts with a null rpc_address, as this is most likely a phantom row in system.peers (JAVA-428).
445+ // Don't test this for the control host since we're already connected to it anyway, and we read the info from system.local
446+ // which doesn't have an rpc_address column (JAVA-546).
447+ } else if (!c.address.equals(host.getSocketAddress()) && row.getInet("rpc_address") == null) {
445448 logger.error("No rpc_address found for host {} in {}'s peers system table. {} will be ignored.", host.getAddress(), c.address, host.getAddress());
446449 return false;
447450 }