DESCRIPTION

JVMCBC-395: support ephemeral buckets in config.

Motivation
----------
Since Couchbase Server 5.0 introduces ephemeral buckets
the SDK needs to support it. Specifically, this has impact
on two pieces.

  - PersistTo can't work by definition
  - Views are inherently disk-based so they also don't work

Modifications
-------------
The server removes parts from the bucket config when ephemeral
bucket mode is selected, namely views altogether. Since prev.
views always implied kv service, the code now adapts to the
fact that views might be missing.

For PersistTo we check if the config is ephemeral (for this a
new getter has been added to the couchbase bucket config) and
if so we short-circuit the observe chain.

Result
------
Support for ephemeral buckets.

Change-Id: I1da500838239959b41c615e0f57d14ef41963436


COMMENTS

author: Natasha Sullivan
date: 2017-02-28 15:50:59.511000000

Uploaded patch set 3.

-------------------------------------
author: Natasha Sullivan
date: 2017-02-28 16:18:28.937000000

Patch Set 3: Verified+1

-------------------------------------
author: Marques Ellis
date: 2017-03-01 22:51:11.551000000

Patch Set 3:

(1 comment)

Line:75, src/main/java/com/couchbase/client/core/config/AbstractBucketConfig.java -> Not sure if this was changed, as far as discussing with Matt and reading through the changes in https://issues.couchbase.com/browse/MB-22703, couchApiBase, ddocs and bucketCapabilities are changed.

-------------------------------------
author: Natasha Sullivan
date: 2017-03-02 10:46:28.161000000

Patch Set 3:

(1 comment)

Line:75, src/main/java/com/couchbase/client/core/config/AbstractBucketConfig.java -> yes, this section here is a bit weird but it basically already takes loaded node infos and enriches it with hostnames for earlier version compat. It has the effect that if the loaded node infos don't have views enabled we don't want to enable them. Otherwise if we just look at nodesExt views might always be enabled on KV nodes since other buckets can use them. Its not super elegant but should be forwards compat

-------------------------------------
author: Marques Ellis
date: 2017-03-02 18:03:04.965000000

Patch Set 3:

(2 comments)

Line:76, src/main/java/com/couchbase/client/core/config/DefaultCouchbaseBucketConfig.java -> Also I think this info is pulled from nodes/nodes ext services which relies on couchApiBase, rather than bucket capability, which is ok, but a more straight forward one would be using bucket capabilities.

Line:75, src/main/java/com/couchbase/client/core/config/AbstractBucketConfig.java -> Yes it is okay

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