Skip to content

Commit 1116ae9

Browse files
authored
Merge pull request apache#779 from datastax/java1357
JAVA-1357: Update documentation for getReplicas
2 parents 2719c65 + 227c720 commit 1116ae9

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

changelog/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

driver-core/src/main/java/com/datastax/driver/core/Metadata.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,12 @@ public Set<Host> getReplicas(String keyspace, ByteBuffer partitionKey) {
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
*

0 commit comments

Comments
 (0)