DESCRIPTION

JVMCBC-393: Add support for the extended KV error map.

Motivation
----------
To be more forwards compatible with future error codes the
server adds a new capability called "the error map", which
is outlined in the internal server documentation.

As a first step, being disabled by default, the client should
be able to load and store this error map and still log
all unknown errors. In future changes the new capabilities
will be enhanced to actually make use of specific behavior.

Modifications
-------------
This changeset adds a new KV handler during bootstrap which,
if enabled, negotiates the XERROR map via HELLO and if set
then adds a new handler that fetches the error map itself.

If loaded properly, the ResponseStatusConverter is fed with
the map but it is only stored if the new map is actually newer
than the currently known one.

For now, unknown errors are looked up in the map and printed
if enabled, but the user won't see a change in behavior
for now.

Result
------
Basic support for the new KV error map feature.

Change-Id: Iaefa0787c19d66c8439b0db2ab4ffb746171e9ad


COMMENTS

author: Natasha Sullivan
date: 2017-03-08 17:39:45.599000000

Uploaded patch set 5: Commit message was updated.

-------------------------------------
author: Natasha Sullivan
date: 2017-03-20 12:25:55.771000000

Patch Set 5:

ping for review

-------------------------------------
author: Marques Ellis
date: 2017-03-23 07:58:08.036000000

Patch Set 5:

(1 comment)

Line:56, src/main/java/com/couchbase/client/core/endpoint/kv/KeyValueErrorMapHandler.java -> Should the handler be removed once the negotiation is done, else all msgs would pass through this channelRead0? Also for these adhoc handlers, I haven't had much success as connect phase never happens and channel promise is not set, anyways kv error map isn't really an important part of negotiation right now.

-------------------------------------
author: Natasha Sullivan
date: 2017-03-29 10:11:33.127000000

Patch Set 5:

(1 comment)

Line:56, src/main/java/com/couchbase/client/core/endpoint/kv/KeyValueErrorMapHandler.java -> yes you are right, I'll make those changes

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