Uploaded image for project: 'Couchbase .NET client library'
  1. Couchbase .NET client library
  2. NCBC-2219

Cluster instantiation using ClusterOptions ignores WithServers servers

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 3.0.0
    • 3.0.0-beta.1
    • library
    • None
    • .NET Core 3.0.1
    • 1

    Description

      Apologies if this turns out to be a matter of incorrect SDK usage. However, I have code like this:

       
      var connectionString = $"couchbase://{servers[0]}";
      var clusterOptionsServers = servers.Select(s => $"couchbase://{s}").ToArray();
      var options = new ClusterOptions()
           .WithServers(clusterOptionsServers)
           .WithCredentials(username, password)
           .WithBucket(_configBucketName);
      _cluster = new Cluster(connectionString, options);
       
      WithServers takes a "params string[]" and I am passing in an array of strings to the 4 cluster servers that we have. My expectation is that is one of them is down, it will open a connection on one of the others. However, whatever is passed into 'WithServers' seems to be ignored in favor of 'connectionString'. And if 'connectionString' is invalid or points to a server that is not running, there is no attempt to cycle through the server list provided in the ClusterOptions.WithServers.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jmorris Jeff Morris
            atkinsr Ryan Atkins (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty