DESCRIPTION

JVMCBC-269: Implement Get Failover Logs (0x54) command

Motivation
----------
To initialize properly the client need to know not only sequence
numbers, but also vBucket UUIDs. One of the ways to do it is to call
0x54 command before requesting the partition stream.

Modification
------------
The changes implements the aforementioned command, but also does a
refactoring required to support this command properly. The biggest part
of it, is that it is not possible to close DCP connection clearly, and
once the client opened temporary DCP connection just to fetch failover
logs, it have to close the socket, otherwise the server to do it on its
own side. The change abstracts this thing and allows to reuse DCP
connection more transparently.

Result
------
It is possible to get current state (with vBucket UUIDs).

Also fixes JVMCBC-267 and JVMCBC-268

Change-Id: I202c992a6342fd9a1e18affb300d294d49850d25


COMMENTS

author: Cory Peck
date: 2015-12-15 17:06:30.156000000

Uploaded patch set 4.

-------------------------------------
author: Hugo Blankenship
date: 2015-12-15 17:06:40.091000000

Patch Set 4: Well-Formed+1

Build Successful 

http://cv.jenkins.couchbase.com/job/restricted-branch-check/618/ : SUCCESS

-------------------------------------
author: Cory Peck
date: 2015-12-15 17:06:52.150000000

Patch Set 4: Verified+1

-------------------------------------
author: Estrella Humphrey
date: 2015-12-15 17:31:11.137000000

Patch Set 4: Code-Review+2

-------------------------------------
author: Natasha Sullivan
date: 2015-12-16 09:18:23.778000000

Patch Set 4: Code-Review-1

(3 comments)

Line:17, /COMMIT_MSG -> changes/change

Line:66, src/main/java/com/couchbase/client/core/dcp/BucketStreamAggregator.java -> this needs to be thread safe. so either make it volatile or use a AtomicReference (see at open)

Line:211, src/main/java/com/couchbase/client/core/dcp/BucketStreamAggregator.java -> if you use an AtomicReference here, you can make use of its compareAndSet to make it really atomic

-------------------------------------
author: Cory Peck
date: 2015-12-16 09:23:22.037000000

Patch Set 4:

(3 comments)

Line:17, /COMMIT_MSG -> Done

Line:66, src/main/java/com/couchbase/client/core/dcp/BucketStreamAggregator.java -> Done

Line:211, src/main/java/com/couchbase/client/core/dcp/BucketStreamAggregator.java -> Done

-------------------------------------
author: Gerrit Code Review
date: 2015-12-16 11:23:55.485000000

Change has been successfully cherry-picked as 66e2e67b1a2f7ebc7462ad4597b92bd3a1552f62

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