Description
From PR -
"If in the web.config <couchbase> section we only have a <servers> section, but no <buckets> section (because we don't want to statically configure any buckets), then when we try to open a bucket using its name, the client tries to use localhost:8091 instead of the server configured <servers>.
The scenario is when our config looks like the following
<couchbaseClients>
|
<couchbase useSsl="false" operationLifespan="1000">
|
<servers>
|
<add uri="http://1.2.3.4:8091/pools"></add>
|
</servers>
|
</couchbase>
|
</couchbaseClients>
|
This causes two problems.
If we have no Couchbase server running at localhost:8091, opening the bucket can take seconds, because the client is trying to connect to localhost at first, and only after that fails does it connect to the configured server. This problem and a workaround is described in detail here: http://stackoverflow.com/questions/34183342/why-can-opening-a-couchbase-bucket-be-very-slow.
If we actually do have a server at localhost:8091, then that is getting used instead of the one configured in <servers>. This is clearly a bug.
With this PR, when we get the configuration for a bucket, the server configuration is getting used even if there is no <buckets> section."
Attachments
For Gerrit Dashboard: NCBC-1076 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
58348,4 | NCBC-1076: Use default server configuration when there is no bucket config | master | couchbase-net-client | Status: MERGED | +2 | +1 |