DESCRIPTION

JVMCBC-469: Set dispatch hostname as early as possible.

Motivation
----------
Previously the dispatch hostname was only set one written down into
netty/after the endpoint. The problem with this approach is that if
we never end up writing down the operation and it times out on the
user side, it might be "null" even if we knew where it should've
gone in the first place.

Modifications
-------------
Once the request reaches the node where it should belong, the
dispatch hostname is set immediately, which in effect labels
the request even if the underlying service (and/or endpoint) is
not available at the moment.

The stringified network address is cached in order to avoid creating
it over and over again on each incoming request.

Result
------
More reliable dispatch hostname detection, which can be utilized
better in higher level code.

Change-Id: I502b1dedb1a90fec5c3c53e9883573abdd662c2e
Reviewed-on: http://review.couchbase.org/84270
Tested-by: Hugo Blankenship xxx@xxx.xxx
Tested-by: Natasha Sullivan xxx@xxx.xxx
Reviewed-by: Carmen Buckley xxx@xxx.xxx
Reviewed-by: Cory Peck xxx@xxx.xxx


COMMENTS

author: Natasha Sullivan
date: 2017-10-12 15:11:16.129000000

Change has been successfully cherry-picked as f84fe4669c998855787a36123f796438c29ae758 by Natasha Sullivan

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