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

MemcachedClient.ExecuteGet(IEnumerable<string> keys) is not returning any error code on connection error

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 1.3.0
    • 1.2.8
    • library
    • None

    Description

      https://www.couchbase.com/issues/browse/CBSE-840

      Method MemcachedClient.ExecuteGet(IEnumerable<string> keys) of .NET SDK is returning empty dictionary when none of specified keys were found. And the same result is returned on connection error. So it is not possible to distinguish between these two cases and it's not possible to find what went wrong.

      static void Main(string[] args)
      {
      using (CouchbaseClient client = new CouchbaseClient("ok"))
      {
      IDictionary<string, IGetOperationResult> res = client.ExecuteGet(new string[]

      { "exist1", "exist2" });
      Console.WriteLine(res.Count);
      }
      using (CouchbaseClient client = new CouchbaseClient("ok"))
      {
      IDictionary<string, IGetOperationResult> res = client.ExecuteGet(new string[] { "not-exist1", "not-exist2" });
      Console.WriteLine(res.Count);
      }
      using (CouchbaseClient client = new CouchbaseClient("wrong"))
      {
      IDictionary<string, IGetOperationResult> res = client.ExecuteGet(new string[] { "exist1", "exist2" }

      );
      Console.WriteLine(res.Count);
      }
      using (CouchbaseClient client = new CouchbaseClient("wrong"))
      {
      IDictionary<string, IGetOperationResult> res = client.ExecuteGet(new string[]

      { "not-exist1", "not-exist2" }

      );
      Console.WriteLine(res.Count);
      }
      }

      Output is:
      2
      0
      0
      0

      Tested on Couchbase client 1.2.6.0 and 1.2.9.0.

      Attachments

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

        Activity

          People

            jmorris Jeff Morris
            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