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

GetAndLock not returning Locked status but timed out when doc is locked

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 2.2.6
    • 2.2.5
    • docs
    • .Net with Couchbase 4.1

    Description

      Hi,
      The Bug is in the GetAndLock mechanism that return op time out instread the proper error and in a propper time (it's about 4sec).

      This is the code below:
      var hosts = new List<Uri>

      { new Uri("http://Rois-MacBook-Pro.local:8091/pools") }

      ;
      var config = new ClientConfiguration()

      { Servers = hosts }

      ;
      var cluster = new Cluster(config);

      var bucket = cluster.OpenBucket("workshop","test");

      var sw = new Stopwatch();
      sw.Start();
      var res1 = bucket.GetWithLock<string>("roikatz",30);
      sw.Stop();
      Console.WriteLine("first op:

      {0}, result: {1}", sw.ElapsedMilliseconds, res1.Status);
      var sw1 = new Stopwatch();
      sw1.Start();
      var res2 = bucket.GetWithLock<string>("roikatz", 30);
      sw1.Stop();
      Console.WriteLine("second op: {0}

      , result

      {1}

      ", sw1.ElapsedMilliseconds, res2.Status);

      And that is the output:
      First op 8ms, result Success
      Second op 4110ms, result OperationTimeout

      In java this code return exception in about 2ms.
      I suspect that is a bug in the SDK.

      Thanks,
      Roi

      Attachments

        Activity

          People

            jmorris Jeff Morris
            roi.katz Roi Katz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              PagerDuty