apache/cassandra — pull request #41 by jacek-lewandowski (2014-08-15 21:05:17+00:00)
Title: CASSANDRA-7774: Fixed cluster initialisation for a split fetching

This patch includes two changes:
1. Changing the way the cluster is initialised for a split
With this patch, the cluster gets the full list of replicas for a particular split as contact points instead of trying to create a cluster for the consecutive contact points in a sequence.

2. A new load balancing policy for fetching a split
LimitedLocalNodeFirstLoadBalancingPolicy chooses alive hosts only among the given replicas - because the connection is used to load the data from the particular split, with a strictly defined list of the replicas, there is no reason to try the other nodes. The policy tracks which of the replicas are alive, and when a new query plan is requested, it returns those replicas in the following order: the local node and then the collection of the remaining hosts (which is shuffled on each request).