DESCRIPTION

JVMCBC-290 Do not initialize DCP for nodes without binary protocol

Motivation
----------
DCP protocol requires port for binary protocol (memcached), so it fails
to initialize service without it.

Modification
------------
Check that node has memcached service before activating DCP

Result
------
DCP works in MDS cluster

Change-Id: I4b20f33c564daca651a1d19acd8917adf663c020


COMMENTS

author: Cory Peck
date: 2016-02-12 18:36:41.865000000

Uploaded patch set 1.

-------------------------------------
author: Cory Peck
date: 2016-02-12 18:36:50.975000000

Patch Set 1: Verified+1

-------------------------------------
author: Estrella Humphrey
date: 2016-02-15 08:16:16.577000000

Patch Set 1: Code-Review+2

-------------------------------------
author: Natasha Sullivan
date: 2016-02-15 08:18:16.642000000

Patch Set 1: Code-Review-2

-------------------------------------
author: Natasha Sullivan
date: 2016-02-15 08:19:08.122000000

Patch Set 1:

Shouldn't this be a locator concern? See https://github.com/couchbase/couchbase-jvm-core/blob/master/src/main/java/com/couchbase/client/core/node/locate/QueryLocator.java#L58 for example.

-------------------------------------
author: Cory Peck
date: 2016-02-15 08:36:45.715000000

Patch Set 1:

But locator takes place after services has been added. And the query example just checks if the services associated with the node.

Do you want me add DCP service to all nodes, and then when locating node for the request, check if there key/value service enabled?

-------------------------------------
author: Natasha Sullivan
date: 2016-02-15 08:39:07.540000000

Patch Set 1:

Okay maybe I'm misunderstanding: can you clarify when a node would have DCP enabled, but not KV? In an MDS scenario when you click the data service it always has both, right?

-------------------------------------
author: Cory Peck
date: 2016-02-15 08:46:56.772000000

Patch Set 1:

Yes, they always come in sync. You cannot deploy DCP without KV and vice versa

-------------------------------------
author: Natasha Sullivan
date: 2016-02-15 08:49:26.104000000

Patch Set 1:

So the case you wan't to make sure things don't break is in a MDS scenario, right? don't open dcp stuff against query/indexing only nodes, right?

-------------------------------------
author: Natasha Sullivan
date: 2016-02-15 08:50:20.514000000

Patch Set 1:

because in your change there, if they are always side by side, under which occasion will there not be a binary service enabled where dcp is?

-------------------------------------
author: Cory Peck
date: 2016-02-15 09:00:24.913000000

Patch Set 1:

You mean the first item in condition? At the moment it will be always true, because DCP is not announced in the config. I could just remove it.

    if (services.containsKey(ServiceType.BINARY) && environment.dcpEnabled()) {

-------------------------------------
author: Gerrit Code Review
date: 2016-02-15 15:49:46.819000000

Change has been successfully cherry-picked as 65211555719a91fd94b87120c4ab6e28e608cf1d

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