DESCRIPTION

JCBC-632: fix node pickup on rebalance

Motivation
----------
When nodes are dropped from a cluster, re-added and rebalanced, the
client fails to pickup the nodes and will stay in a state where no data
operations succeed.

This is due to a race condition where the Locator's list of Nodes is
out of date with the atomically updated configuration host array.

This results in an IllegalStateException because we look for a Node
(from the configuration) not contained in the Nodes List.

Modifications
-------------
In the Locator, we check if the list of Nodes has a different size than
the configuration's partitionHosts list. If so, we just reschedule the
request by returning an empty Node array.

Result
------
Operations continue (at a much much lower pace) during the failover and
once the nodes are added back, they are picked up immediately. Then the
operations ramp up during rebalance and everything gets back to normal.

Change-Id: I9dad2cb30aba49d62cf65370d83559d2f8f6038f


COMMENTS

author: Estrella Humphrey
date: 2014-11-19 11:26:20.890000000

Uploaded patch set 1.

-------------------------------------
