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

Client failling to rebootstrap from dns srv level

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 3.4.0
    • None
    • None
    • 1

    Description

      DNS SRV refresh does not seem to be happening for the client when the nodes become unreachable, and the DNS SRV record has been updated.

      This is the test being run (same test to the other SDKs for this):

              [Fact]
              public async Task Test_Local()
              {
                  using var loggerFactory = new TestOutputLoggerFactory(_outputHelper);
                  var cluster = await Couchbase.Cluster.ConnectAsync("dotnet123.cbqeoc.com", new ClusterOptions()
                  {
                      UserName = "Administrator",
                      Password = "password",
                      Logging = loggerFactory,
                      EnableDnsSrvResolution = true
                  });
       
                  await cluster.WaitUntilReadyAsync(TimeSpan.FromSeconds(30));
       
                  var bucket = await cluster.BucketAsync("default");
                  var col = bucket.DefaultCollection();
       
                  while (true)
                  {
                      try
                      {
                          var doc1 = Guid.NewGuid().ToString();
                          await col.UpsertAsync(doc1, "Content data", options => options.Expiry(TimeSpan.FromSeconds(10)));
                      }
                      catch (Exception e)
                      {
                          _outputHelper.WriteLine(e.Message);
                      }
                  }
              }
      

      And the logs are here: dnssrv-test-fail.txt

      I've been testing with a 3 node cluster (all kv nodes only), and a default bucket.
      The test starts with the srv record being dotnet123.cbqeoc.com
      and had the following records: node1-e4c8609a.cbqeoc.com, node2-e4c8609a.cbqeoc.com, node3-e4c8609a.cbqeoc.com

      The client successfully resolved and connected and was doing upserts. Then I stopped the client (sigstop), and deleted the cluster and replaced the dns records with node1-fd229c81.cbqeoc.com, node2-fd229c81.cbqeoc.com, node3-fd229c81.cbqeoc.com.

      I checked the DNS change had been propagated (nslookup), and 'woke up' (sigcont) the client test. The client continued to try to do upserts against the original cluster and and did not attempt to re-do a DNS SRV lookup (I left it running for a couple minutes in one of my tests).

      Also, I ran the tests again afterwards and the client does resolve and bootstrap with the new records, just to confirm.

      Attachments

        For Gerrit Dashboard: NCBC-3288
        # Subject Branch Project Status CR V

        Activity

          People

            will.broadbelt Will Broadbelt
            will.broadbelt Will Broadbelt
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty