Commit 37cf31f4 authored by Andy Wilkinson's avatar Andy Wilkinson

Upgrade to Couchbase Java Client 2.3.7

In version 2.3.6 and earlier, an attempt to create a Bucket or a
ClusterInfo would fail fast with a ConnectException in the cause of
the Couchbase server was done. In 2.3.7 this remains true for a
Bucket but is no longer the case for ClusterInfo. The latter now
retries for 75 seconds by default and when it eventually fails a
ConnectException is no longer part of the cause chain.

This commit makes the auto-configured ClusterInfo depend on the
auto-configured Bucket. This means that the Bucket is always created
before the ClusterInfo, thereby ensuring that things fail gracefully
with useful diagnostics when the server is unavailable.

Closes gh-8092
parent 9a65968c
......@@ -32,6 +32,7 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.DependsOn;
import org.springframework.context.annotation.Primary;
/**
......@@ -72,6 +73,7 @@ public class CouchbaseAutoConfiguration {
@Bean
@Primary
@DependsOn("couchbaseClient")
public ClusterInfo couchbaseClusterInfo() throws Exception {
return couchbaseCluster()
.clusterManager(this.properties.getBucket().getName(),
......
......@@ -65,7 +65,7 @@
<commons-digester.version>2.1</commons-digester.version>
<commons-pool.version>1.6</commons-pool.version>
<commons-pool2.version>2.4.2</commons-pool2.version>
<couchbase-client.version>2.3.6</couchbase-client.version>
<couchbase-client.version>2.3.7</couchbase-client.version>
<couchbase-cache-client.version>2.1.0</couchbase-cache-client.version>
<crashub.version>1.3.2</crashub.version>
<derby.version>10.13.1.1</derby.version>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment