DESCRIPTION

JVMCBC-358: Round Robin Endpoint selection strategy

Motivation:
-----------
Current endpoint selection strategy is either `Random` or based on
`Partition`. It was observed that random selection could lead to a same
endpoint being chosen several times in a row, and with long running
requests (like N1QL queries) this can add up. Thus a round robin
selection is probably a better fit.

Modifications:
--------------
Added a new `SelectionStrategy`, the `RoundRobinSelectionStrategy`.

Made `QueryService` use that strategy for its endpoints.

Results:
--------
Fairer endpoint selection strategy can now be used.

Change-Id: I5048bde97d239f72c3232becccdea7bea46c7313


COMMENTS

author: Estrella Humphrey
date: 2016-08-22 15:39:59.538000000

Uploaded patch set 1.

-------------------------------------
author: Estrella Humphrey
date: 2016-08-22 16:42:50.659000000

Patch Set 1: Verified+1

-------------------------------------
author: Natasha Sullivan
date: 2016-08-24 12:43:44.608000000

Patch Set 1:

(2 comments)

Line:28, src/main/java/com/couchbase/client/core/service/strategies/RoundRobinSelectionStrategy.java -> ?? :D

Line:32, src/main/java/com/couchbase/client/core/service/strategies/RoundRobinSelectionStrategy.java -> should we make it volatile long? so we don't run into wrapping and also maybe weird visibility issues if called from multiple threads.. but maybe int is fine too

-------------------------------------
author: Estrella Humphrey
date: 2016-08-24 13:30:01.584000000

Patch Set 1:

(1 comment)

Line:28, src/main/java/com/couchbase/client/core/service/strategies/RoundRobinSelectionStrategy.java -> Done

-------------------------------------
author: Gerrit Code Review
date: 2016-08-24 13:45:07.792000000

Change has been successfully cherry-picked as f76a739978ae9ddec227da89b9b8505fb7bae57d by Estrella Humphrey

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