Elffuss BraidHub

kikocis/java-driver public

JAVA-1357: Update documentation for getReplicas

Motivation:

Metadata.getReplicas(String, TokenRange) currently assumes that the
TokenRange provided represents a TokenRange for a single host. Because
of this, it finds the replicas for the last Token on that range instead
of considering the entire range.  Document that this is the case.

Modifications:

Updated method javadoc.
Changeset550e311618a95670039220fb71b16a14507e8cab6b92e02bb0c14c8d67736c50
AuthorAndrew Tolbert <andrew.tolbert@datastax.com> · 2016-12-28 11:42 -06:00
CommitterAlexandre Dutra <alexandre.dutra@datastax.com> · 2017-02-10 17:13 +01:00
Parents33225dc7a799

Browse the files at this changeset

2 files changed

modified changelog/README.md +1 −0
@@ -5,6 +5,7 @@
55 - [bug] JAVA-1371: Reintroduce connection pool timeout.
66 - [bug] JAVA-1313: Copy SerialConsistencyLevel to PreparedStatement.
77 - [documentation] JAVA-1334: Clarify documentation of method `addContactPoints`.
8+- [improvement] JAVA-1357: Document that getReplicas only returns replicas of the last token in range.
89
910
1011 ### 3.0.6
modified driver-core/src/main/java/com/datastax/driver/core/Metadata.java +6 −1
@@ -305,7 +305,12 @@
305305 /**
306306 * Returns the set of hosts that are replica for a given token range.
307307 * <p/>
308- * Note that this information is refreshed asynchronously by the control
308+ * Note that it is assumed that the input range does not overlap across multiple host ranges.
309+ * If the range extends over multiple hosts, it only returns the replicas for those hosts
310+ * that are replicas for the last token of the range. This behavior may change in a future
311+ * release, see <a href="https://datastax-oss.atlassian.net/browse/JAVA-1355">JAVA-1355</a>.
312+ * <p/>
313+ * Also note that this information is refreshed asynchronously by the control
309314 * connection, when schema or ring topology changes. It might occasionally
310315 * be stale (or even empty).
311316 *