DESCRIPTION

JVMCBC-288: Locators need to take enabled services into account.

Motivation
----------
The round robin locators need to have better logic in place than
they do currently. They have the following limitations:

  - They do not check if the service is enabled on the target node,
    leading to false positives and therefore needless rescheduling.
  - They loop through the nodes in a simple fashion, only trying the
    current index. If this doesn't work, the request will be
    rescheduled.

Modifications
-------------
The logic has been replaced (and builds on the previous changes) so
that while an initial offset is still used, the code now "wraps" when
it hits the end of the node list and starts from the beginning.

As a result, all nodes in the list will be at least tried once before
the request is set to be rescheduled (or cancelled, depending on the
strategy used).

In addition, the locators now properly check if the service is enabled
on the target node, making it more reliable upfront in picking the
right nodes where the request can be serviced.

Result
------
No needless rescheduling of requests since with the new logic there
is a much higher chance the right node is selected.

Change-Id: Iff607a2de49aef1ab099b42d4f2199b5c7c2f53c


COMMENTS

author: Natasha Sullivan
date: 2016-02-01 14:47:47.211000000

Uploaded patch set 2: Commit message was updated.

-------------------------------------
author: Gerrit Code Review
date: 2016-02-01 15:54:50.869000000

Change has been successfully cherry-picked as 2c97e897faaaa12400469f224bc281ecd9a4c1ab

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