kikocis/java-driver public
Changesets · Branches · Tags · Compare
| Changeset | 26add0c6583f8ea5bd8d0812d6b2dc966506bd0c4d4323b48b3aa08e58fdaa33 |
|---|---|
| Author | olim7t <omichallat+github@gmail.com> · 2014-08-29 13:07 +02:00 |
| Committer | olim7t <omichallat+github@gmail.com> · 2014-08-29 13:07 +02:00 |
| Parents | 724881bcc920 |
1 file changed
modified driver-core/src/main/java/com/datastax/driver/core/ControlConnection.java +9 −2
| @@ -411,8 +411,15 @@ | ||
| 411 | 411 | logger.debug("[Control connection] Refreshing node info on {}", host); |
| 412 | 412 | Row row = fetchNodeInfo(host, c); |
| 413 | 413 | if (row == null) { |
| 414 | - logger.error("No row found for host {} in {}'s peers system table. {} will be ignored.", host.getAddress(), c.address, host.getAddress()); | |
| 415 | - return false; | |
| 414 | + if (c.isDefunct()) { | |
| 415 | + logger.debug("Control connection is down, could not refresh node info"); | |
| 416 | + // Keep going with what we currently know about the node, otherwise we will ignore all nodes | |
| 417 | + // until the control connection is back up (which leads to a catch-22 if there is only one) | |
| 418 | + return true; | |
| 419 | + } else { | |
| 420 | + logger.error("No row found for host {} in {}'s peers system table. {} will be ignored.", host.getAddress(), c.address, host.getAddress()); | |
| 421 | + return false; | |
| 422 | + } | |
| 416 | 423 | } else if (row.getInet("rpc_address") == null) { |
| 417 | 424 | logger.error("No rpc_address found for host {} in {}'s peers system table. {} will be ignored.", host.getAddress(), c.address, host.getAddress()); |
| 418 | 425 | return false; |