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

N1QL queries continue to fail after a node goes on/offline

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 2.4.0-dp3, 2.3.11
    • 2.4.0
    • library
    • None

    Description

      System.InvalidOperationException: An invalid request URI was provided. The request URI must either be an absolute URI or BaseAddress must be set.
      at System.Net.Http.HttpClient.PrepareRequestMessage(HttpRequestMessage request)
      at System.Net.Http.HttpClient.SendAsync(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken)
      at System.Net.Http.HttpClient.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
      at System.Net.Http.HttpClient.PostAsync(Uri requestUri, HttpContent content, CancellationToken cancellationToken)
      at Couchbase.N1QL.QueryClient.<ExecuteQueryAsync>d__19`1.MoveNext()
      

      ExecuteQueryAsync uses GetQueryUri to get the query server's URI:
      https://github.com/brantburnett/couchbase-net-client/blob/d852271c09a9116275e058412f1f82eabacbed01/Src/Couchbase/N1QL/QueryClient.cs#L367

      Uri is considered healthy if it has failed less than 2 times since last success, returns null if no query nodes avail:
      https://github.com/brantburnett/couchbase-net-client/blob/d852271c09a9116275e058412f1f82eabacbed01/Src/Couchbase/Configuration/ConfigContextBase.cs#L71

      Count is only reset if there is a successful query, no other time:
      https://github.com/brantburnett/couchbase-net-client/blob/d852271c09a9116275e058412f1f82eabacbed01/Src/Couchbase/N1QL/QueryClient.cs#L387

      So, basically, once the client considers the query node down it will never use it again (except maybe if there's a rebalance?)

      Attachments

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

        Activity

          jmorris Jeff Morris added a comment -

          Based upon customer feedback, I am pushing this into 2.4.0 and updating the priority to blocker.

          jmorris Jeff Morris added a comment - Based upon customer feedback, I am pushing this into 2.4.0 and updating the priority to blocker.

          People

            btburnett3 Brant Burnett
            jmorris Jeff Morris
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty