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

Subdoc mutation w/CAS fails on locked item

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.5.0, 4.5.1
    • 4.6.2
    • memcached
    • Untriaged
    • Unknown

    Description

      The following script fails with KEY_EEXISTS

       

      #!/usr/bin/env python
       
      from couchbase.bucket import Bucket
      import couchbase.subdocument as SD
       
      cb = Bucket('couchbase://localhost/test')
       
      cb.upsert('0', {'recs':[]})
       
      #fails
      result = cb.lock('0', ttl=5)
      cb.mutate_in('0', SD.array_append('recs', 1), cas=result.cas)
      

      Dean Proctor has also verified this fails with Java as well, so this isn't a client bug.

      Attachments

        Issue Links

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

          Activity

            mnunberg Mark Nunberg (Inactive) created issue -
            mnunberg Mark Nunberg (Inactive) made changes -
            Field Original Value New Value
            Description The following script fails with KEY_EEXISTS

             {code}
            #!/usr/bin/env python

            from couchbase.bucket import Bucket
            import couchbase.subdocument as SD

            cb = Bucket('couchbase://localhost/test')

            cb.upsert('0', {'recs':[]})

            #fails
            result = cb.lock('0', ttl=5)
            cb.mutate_in('0', SD.array_append('recs', 1), cas=result.cas)
            {code}
            The following script fails with KEY_EEXISTS

             {code}
            #!/usr/bin/env python

            from couchbase.bucket import Bucket
            import couchbase.subdocument as SD

            cb = Bucket('couchbase://localhost/test')

            cb.upsert('0', {'recs':[]})

            #fails
            result = cb.lock('0', ttl=5)
            cb.mutate_in('0', SD.array_append('recs', 1), cas=result.cas)
            {code}

            [~dproctor] has also verified this fails with Java as well, so this isn't a client bug.
            raju Raju Suravarjjala made changes -
            Fix Version/s 4.6.1 [ 13903 ]
            mnunberg Mark Nunberg (Inactive) made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            drigby Dave Rigby made changes -
            Link This issue blocks MB-22188 [ MB-22188 ]
            drigby Dave Rigby made changes -
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Resolved [ 5 ]
            mnunberg Mark Nunberg (Inactive) made changes -
            Status Resolved [ 5 ] Closed [ 6 ]
            pvarley Patrick Varley made changes -
            Link This issue blocks CBSE-4111 [ CBSE-4111 ]

            People

              mnunberg Mark Nunberg (Inactive)
              mnunberg Mark Nunberg (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                PagerDuty