DESCRIPTION

JVMCBC-79: Only route config request to the node with the service enabled.

Motivation
----------
When an additional bucket is opened (and other nodes are already connected), it
could be the case that the bucket config request for the new bucket is routed
onto a node where the keyvalue service is not enabled yet.

This leads to config requested "routed around" to the wrong node, even when
the service has been properly established on another node. As a result,
the observable is never completed, leading to a Timeout at the user level.

If the openBucket happens quickly one after another, or if the node set is
just correctly sorted by accident (or if there is only one node), this issue
does not show up (since it happens to be the right node).

Modifications
-------------
When the node locator gets the request, it not only checks if the node is
already connected, but also if the request is routed to the correct hostname.

The hostname passed in to the node locator as part of the request is the same
where the service was initiated before by the configuration loader.

Result
------
The bucket config request is always routed to the proper bucket, making sure
an additional openBucket request always succeeds.

Change-Id: If5830059cdb695c2692ad0c6f3373eb30d97a3c9
Reviewed-on: http://review.couchbase.org/43845
Tested-by: Natasha Sullivan xxx@xxx.xxx
Reviewed-by: Estrella Humphrey xxx@xxx.xxx


COMMENTS

author: Natasha Sullivan
date: 2014-12-02 16:36:39.592000000

Change has been successfully cherry-picked as 35e5791caebd8f29de8fc9167a49ea9bbf2defe5

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