fix subList bug
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7a87fc11 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7a87fc11 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7a87fc11 Branch: refs/heads/trunk Commit: 7a87fc1186f39678382cf9b3e1dd224d9c71aead Parents: 20c419b Author: Jonathan Ellis <jbel...@apache.org> Authored: Thu Sep 26 16:10:15 2013 -0500 Committer: Jonathan Ellis <jbel...@apache.org> Committed: Thu Sep 26 16:10:15 2013 -0500 ---------------------------------------------------------------------- src/java/org/apache/cassandra/service/AbstractReadExecutor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/7a87fc11/src/java/org/apache/cassandra/service/AbstractReadExecutor.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/cassandra/service/AbstractReadExecutor.java b/src/java/org/apache/cassandra/service/AbstractReadExecutor.java index 83368c2..280715a 100644 --- a/src/java/org/apache/cassandra/service/AbstractReadExecutor.java +++ b/src/java/org/apache/cassandra/service/AbstractReadExecutor.java @@ -321,7 +321,7 @@ public abstract class AbstractReadExecutor @Override public void executeAsync() { - makeDataRequests(targetReplicas.subList(0, 2)); + makeDataRequests(targetReplicas.subList(0, targetReplicas.size() > 1 ? 2 : 1)); if (targetReplicas.size() > 2) makeDigestRequests(targetReplicas.subList(2, targetReplicas.size())); cfs.metric.speculativeRetry.inc();