kikocis/java-driver public
Changesets · Branches · Tags · Compare
| Changeset | 493693bdeaa2a1eb5c12c2fefe9b36ecffe81dac3ae698d523384b049a9fc5a0 |
|---|---|
| Author | Olivier Michallat <olim7t@users.noreply.github.com> · 2016-06-27 11:09 -07:00 |
| Committer | GitHub <noreply@github.com> · 2016-06-27 11:09 -07:00 |
| Parents | 4f91f988cb6c |
2 files changed
modified changelog/README.md +1 −0
| @@ -9,6 +9,7 @@ | ||
| 9 | 9 | - [improvement] JAVA-1204: Update documentation to indicate tcnative version requirement. |
| 10 | 10 | - [bug] JAVA-1186: Fix duplicated hosts in DCAwarePolicy warn message. |
| 11 | 11 | - [bug] JAVA-1187: Fix warning message when local CL used with RoundRobinPolicy. |
| 12 | +- [improvement] JAVA-1175: Warn if DCAwarePolicy configuration is inconsistent. | |
| 12 | 13 | |
| 13 | 14 | |
| 14 | 15 | ### 3.0.2 |
modified driver-core/src/main/java/com/datastax/driver/core/policies/DCAwareRoundRobinPolicy.java +4 −0
| @@ -356,6 +356,10 @@ | ||
| 356 | 356 | * @return the policy. |
| 357 | 357 | */ |
| 358 | 358 | public DCAwareRoundRobinPolicy build() { |
| 359 | + if (usedHostsPerRemoteDc == 0 && allowRemoteDCsForLocalConsistencyLevel) { | |
| 360 | + logger.warn("Setting allowRemoteDCsForLocalConsistencyLevel has no effect if usedHostsPerRemoteDc = 0. " | |
| 361 | + + "This setting will be ignored"); | |
| 362 | + } | |
| 359 | 363 | return new DCAwareRoundRobinPolicy(localDc, usedHostsPerRemoteDc, allowRemoteDCsForLocalConsistencyLevel, true); |
| 360 | 364 | } |
| 361 | 365 | } |