Elffuss BraidHub

kikocis/java-driver public

Reduce level of logs on missing rpc_address (JAVA-568).
Changeset7d498797e8476bac775511047abf2ec939da2bde3a89febbefc1c0b13e5881b0
Authorolim7t <omichallat+github@gmail.com> · 2015-02-03 14:52 +01:00
Committerolim7t <omichallat+github@gmail.com> · 2015-02-03 14:53 +01:00
Parentsf3def2c54d3f

Browse the files at this changeset

2 files changed

modified driver-core/CHANGELOG.rst +1 −0
@@ -6,6 +6,7 @@
66
77 - [new feature] Add AddressTranslater for EC2 multi-region deployment (JAVA-518)
88 - [improvement] Add connection heartbeat (JAVA-533)
9+- [improvement] Reduce level of logs on missing rpc_address (JAVA-568)
910
1011 Merged from 2.0.9_fixes branch:
1112
modified driver-core/src/main/java/com/datastax/driver/core/ControlConnection.java +3 −3
@@ -386,7 +386,7 @@
386386 return null;
387387 } else if (addr == null) {
388388 if (logMissingRpcAddresses)
389- logger.error("No rpc_address found for host {} in {}'s peers system table. {} will be ignored.", peer, connectedHost, peer);
389+ logger.warn("No rpc_address found for host {} in {}'s peers system table. {} will be ignored.", peer, connectedHost, peer);
390390 return null;
391391 } else if (addr.equals(bindAllAddress)) {
392392 logger.warn("Found host with 0.0.0.0 as rpc_address, using listen_address ({}) to contact it instead. If this is incorrect you should avoid the use of 0.0.0.0 server side.", peer);
@@ -436,14 +436,14 @@
436436 // until the control connection is back up (which leads to a catch-22 if there is only one)
437437 return true;
438438 } else {
439- logger.error("No row found for host {} in {}'s peers system table. {} will be ignored.", host.getAddress(), c.address, host.getAddress());
439+ logger.warn("No row found for host {} in {}'s peers system table. {} will be ignored.", host.getAddress(), c.address, host.getAddress());
440440 return false;
441441 }
442442 // Ignore hosts with a null rpc_address, as this is most likely a phantom row in system.peers (JAVA-428).
443443 // Don't test this for the control host since we're already connected to it anyway, and we read the info from system.local
444444 // which doesn't have an rpc_address column (JAVA-546).
445445 } else if (!c.address.equals(host.getSocketAddress()) && row.getInet("rpc_address") == null) {
446- logger.error("No rpc_address found for host {} in {}'s peers system table. {} will be ignored.", host.getAddress(), c.address, host.getAddress());
446+ logger.warn("No rpc_address found for host {} in {}'s peers system table. {} will be ignored.", host.getAddress(), c.address, host.getAddress());
447447 return false;
448448 }
449449