DESCRIPTION

JVMCBC-312: use the same logical connection for all DCP nodes

Motivation
----------
DCP connection have to be opened on each node separately, but from the
SDK perspective, there is only one logical connection and stream. But
current implementation was creating logical connection for every node,
and only first connection was actually visible to the consumer.

Modification
------------
Maintain map of logical connection, and reuse it when new DCP connection
with the same name has been requested. Also dispose the connection only
when all streams from all nodes has been closed.

Result
------
No missing messages anymore

Change-Id: Iedd8268eddd898677844a80c32cb184c5db9a7ad


COMMENTS

author: Cory Peck
date: 2016-03-16 07:40:50.634000000

Uploaded patch set 3.

-------------------------------------
author: Estrella Humphrey
date: 2016-03-16 12:13:16.457000000

Patch Set 3: -Code-Review

(1 comment)

Line:317, src/main/java/com/couchbase/client/core/endpoint/dcp/DCPHandler.java -> so in effect the connection.subject() is never completed? is that still work in progress?

-------------------------------------
author: Cory Peck
date: 2016-03-16 14:40:03.494000000

Patch Set 3:

(1 comment)

Line:317, src/main/java/com/couchbase/client/core/endpoint/dcp/DCPHandler.java -> This is question I'm trying to solve actually, because stream requests are not sent all at once, and if condition met, the server will close the stream before others requests will hit the nodes.

-------------------------------------
author: Gerrit Code Review
date: 2016-03-30 07:02:23.834000000

Change has been successfully cherry-picked as bddbdae7e92e13112e649eca4d35f786599f4493

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