DESCRIPTION

JCBC-459: Ignore Configurations with old (or same) revID.

Motivation
----------
If carrier config is used, new configuration arrives in the payload of the
NMVB responses. Since configurations trickle through the server cluster not
100% at the same time, it can happen that we get a outdated configuration from
one of the nodes, where the client already is in the posession of a newer
one.

The server emits a revid with a monotonically increasing number, so if we
have a higher revid we can skip/discard incoming older ones and keep going.
By not ignoring them, the client may run into a situation where it updates
a older config in place for a newer one.

Modifications
-------------
The revnr is parsed out of the configuration, but if no id is set (for backwards
compatibility reasons), -1 is used. In the provider itself, if the number is > 0
it is checked against the current known revnr and if higher the new config
is used and the subscribers are notified.

Result
------
Older configurations will now not be used anymore if a newer version is already
in the posession of the SDK.

Change-Id: I0eb5af448e8149017962030de6fe054358bd67ea


COMMENTS

author: Natasha Sullivan
date: 2014-05-12 09:38:02.993000000

Uploaded patch set 1.

-------------------------------------
author: Andreas Short
date: 2014-05-14 04:56:47.431000000

Patch Set 1: Code-Review+2

nice work!

-------------------------------------
author: Enrique Carlson
date: 2014-05-14 17:44:51.359000000

Patch Set 1: Code-Review+2

(1 comment)

Looks good to me. I like the mocking, the .NET 2.X client is largely missing that right now.

Line:369, src/main/java/com/couchbase/client/vbucket/provider/BucketConfigurationProvider.java -> Should this be warn? i.e. if you set debug level to warn, you only see config changes and above. I think debug should be operation level tracing. Just my opinion :)

-------------------------------------
author: Natasha Sullivan
date: 2014-05-14 18:09:59.012000000

Patch Set 1:

(1 comment)

Line:369, src/main/java/com/couchbase/client/vbucket/provider/BucketConfigurationProvider.java -> Hey Jeff,

not sure what you mean, because if this is set to WARN every one will see new configurations coming in - this is not the intent. This is really intended for debugging if there is a concern that a config is not applied appropriately.

-------------------------------------
author: Natasha Sullivan
date: 2014-05-16 09:33:09.138000000

Patch Set 2: Patch Set 1 was rebased

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