Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-7018

CAS value ignored when performing increment or decrement

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • 2.1.0
    • 2.0-beta
    • couchbase-bucket
    • Security Level: Public
    • Windows 7, discovered using the .NET Client Library 1.2-Beta

    Description

      When testing the CouchbaseClient.Decrement(Key, Default, Delta, CAS), it was discovered that the server is not honoring the invalid CAS and is successfully Decrementing the value. Matt confirmed with Trond that this is a server issue.

      Workaround: perform a set/replace with CAS instead of a incr/decr, doing the incr/decr on the client side.

      var decrementResult = client.Decrement(key, 100, 10);
      var casResult = client.GetWithCas(key);
      var result = client.Decrement(key, 100, 10, casResult.Cas - 1); //result is true, but should be false

      Attachments

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

        Activity

          People

            deepkaran.salooja Deepkaran Salooja
            john John Zablocki (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty