kikocis/java-driver public
Changesets · Branches · Tags · Compare
| Changeset | cbe1bc533f9e459271017d677cdbac27703007674c6e51b66dc51874425a0b20 |
|---|---|
| Author | Olivier Michallat <olim7t@users.noreply.github.com> · 2016-06-27 11:19 -07:00 |
| Committer | GitHub <noreply@github.com> · 2016-06-27 11:19 -07:00 |
| Parents | ba109c0e72ce |
2 files changed
modified changelog/README.md +1 −0
| @@ -11,6 +11,7 @@ | ||
| 11 | 11 | - [bug] JAVA-1187: Fix warning message when local CL used with RoundRobinPolicy. |
| 12 | 12 | - [improvement] JAVA-1175: Warn if DCAwarePolicy configuration is inconsistent. |
| 13 | 13 | - [bug] JAVA-1139: ConnectionException.getMessage() throws NPE if address is null. |
| 14 | +- [bug] JAVA-1202: Handle null rpc_address when checking schema agreement. | |
| 14 | 15 | |
| 15 | 16 | |
| 16 | 17 | ### 3.0.2 |
modified driver-core/src/main/java/com/datastax/driver/core/ControlConnection.java +3 −1
| @@ -383,11 +383,13 @@ | ||
| 383 | 383 | |
| 384 | 384 | if (broadcastAddress == null) { |
| 385 | 385 | return null; |
| 386 | - } else if (broadcastAddress.equals(connectedHost.getAddress()) || rpcAddress.equals(connectedHost.getAddress())) { | |
| 386 | + } else if (broadcastAddress.equals(connectedHost.getAddress()) || (rpcAddress != null && rpcAddress.equals(connectedHost.getAddress()))) { | |
| 387 | 387 | // Some DSE versions were inserting a line for the local node in peers (with mostly null values). This has been fixed, but if we |
| 388 | 388 | // detect that's the case, ignore it as it's not really a big deal. |
| 389 | 389 | logger.debug("System.peers on node {} has a line for itself. This is not normal but is a known problem of some DSE version. Ignoring the entry.", connectedHost); |
| 390 | 390 | return null; |
| 391 | + } else if (rpcAddress == null) { | |
| 392 | + return null; | |
| 391 | 393 | } else if (rpcAddress.equals(bindAllAddress)) { |
| 392 | 394 | logger.warn("Found host with 0.0.0.0 as rpc_address, using broadcast_address ({}) to contact it instead. If this is incorrect you should avoid the use of 0.0.0.0 server side.", broadcastAddress); |
| 393 | 395 | rpcAddress = broadcastAddress; |