Uploaded image for project: 'Couchbase C client library libcouchbase'
  1. Couchbase C client library libcouchbase
  2. CCBC-1514

New memcached status code leads to an unrelated CAS error being printed by pillowfight

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 3.2.4
    • 3.3.1
    • library
    • None
    • 1

    Description

      When running a Couchbase Server that has 'scope data limits' enabled, libcouchbase shows a confusing/unexpected message when the data-limit his reached, in this case memcached fails mutation commands with status 0x34 and the following is displayed by pillowfight Operation(s) failed: LCB_ERR_CAS_MISMATCH (209): CAS mismatch.

      Some brief discussion suggest this is just because the libcouchbase I used didn't support the V2 error map, so please close this issue if another ticket tracks that work
      and this ticket is expected behaviour for the down-level libcouchbase (although an improvement/suggestion would be to not print CAS_MISMATCH, this is confusing, a raw status may of been more useful for people to debug issues).

      To reproduce I think the following works without a source build.

      • Add a collection to the new scope

        couchbase-cli  collection-manage -c cluster-ip:8091 -u Administrator -p asdasd --bucket default --create-collection s1.jim
        

      Now run pillowfight so it hits the data limit

      cbc-pillowfight -U 'couchbase://cluster-ip:11210/default' -u Administrator -P asdasd -m 500 -M 500 -I 1000000 --populate-only --collection s1.jim
      

      Note in my testing I was using libcouchbase from my server build with the following SHA

      • 494582fa 2021-10-13 | CCBC-1510: fix key length calculation for exists/get/touch/unlock (HEAD, m/master) [Sergey Avseyev]

      cbc-pillowfight will eventually return:

      Operation(s) failed: LCB_ERR_CAS_MISMATCH (209): CAS mismatch
      

      If the toy-build is not required/wanted a server build can be used from this SHA that represent the feature in development

      Also fyi the new status code was added here http://review.couchbase.org/c/kv_engine/+/164048

      Attachments

        Issue Links

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

          Activity

            People

              avsej Sergey Avseyev
              jwalker Jim Walker
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty