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

          For Gerrit Dashboard: MB-22044
          # Subject Branch Project Status CR V

          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 ]
            drigby Dave Rigby added a comment -

            Is this maybe the same issue as MB-21597? i.e. as the code uses REPLACE instead of CAS internally, any non-zero input CAS will fail?

            Mark Nunberg could you check if it still occurs on 4.6.0 / latest watson branch?

             

            drigby Dave Rigby added a comment - Is this maybe the same issue as  MB-21597 ? i.e. as the code uses REPLACE instead of CAS internally, any non-zero input CAS will fail? Mark Nunberg could you check if it still occurs on 4.6.0 / latest watson branch?  
            drigby Dave Rigby added a comment -

            Mark Nunberg Are you ok to investigate this and fix (if necessary) for 4.6.1? If not let me know and I'll re-assign.

            drigby Dave Rigby added a comment - Mark Nunberg Are you ok to investigate this and fix (if necessary) for 4.6.1? If not let me know and I'll re-assign.

            It still happens with the latest master build. I'll investigate and see if I can fix.

            mnunberg Mark Nunberg (Inactive) added a comment - It still happens with the latest master build. I'll investigate and see if I can fix.
            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 ]

            Build 4.6.1-3807 contains memcached commit 81c00ea9df249728a082299d3a958767949aa2a3 with commit message:
            MB-22044: EWBEngineMode::SetItemCas (1/3)
            https://github.com/couchbase/memcached/commit/81c00ea9df249728a082299d3a958767949aa2a3

            build-team Couchbase Build Team added a comment - Build 4.6.1-3807 contains memcached commit 81c00ea9df249728a082299d3a958767949aa2a3 with commit message: MB-22044 : EWBEngineMode::SetItemCas (1/3) https://github.com/couchbase/memcached/commit/81c00ea9df249728a082299d3a958767949aa2a3

            Build 4.6.1-3807 contains memcached commit 072764b50ab559101f05f2e1f7298f54c5ccfa43 with commit message:
            MB-22044: ewouldblock_engine_configure: Allow to pass key (2/3)
            https://github.com/couchbase/memcached/commit/072764b50ab559101f05f2e1f7298f54c5ccfa43

            build-team Couchbase Build Team added a comment - Build 4.6.1-3807 contains memcached commit 072764b50ab559101f05f2e1f7298f54c5ccfa43 with commit message: MB-22044 : ewouldblock_engine_configure: Allow to pass key (2/3) https://github.com/couchbase/memcached/commit/072764b50ab559101f05f2e1f7298f54c5ccfa43

            Build 4.6.1-3807 contains memcached commit a8389c0419c54cfb00056b5a64913617f5af2cea with commit message:
            MB-22044: Subdoc should detect and handle locked items (3/3)
            https://github.com/couchbase/memcached/commit/a8389c0419c54cfb00056b5a64913617f5af2cea

            build-team Couchbase Build Team added a comment - Build 4.6.1-3807 contains memcached commit a8389c0419c54cfb00056b5a64913617f5af2cea with commit message: MB-22044 : Subdoc should detect and handle locked items (3/3) https://github.com/couchbase/memcached/commit/a8389c0419c54cfb00056b5a64913617f5af2cea
            drigby Dave Rigby made changes -
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Resolved [ 5 ]

            Build 5.0.0-2291 contains memcached commit 81c00ea9df249728a082299d3a958767949aa2a3 with commit message:
            MB-22044: EWBEngineMode::SetItemCas (1/3)
            https://github.com/couchbase/memcached/commit/81c00ea9df249728a082299d3a958767949aa2a3

            build-team Couchbase Build Team added a comment - Build 5.0.0-2291 contains memcached commit 81c00ea9df249728a082299d3a958767949aa2a3 with commit message: MB-22044 : EWBEngineMode::SetItemCas (1/3) https://github.com/couchbase/memcached/commit/81c00ea9df249728a082299d3a958767949aa2a3

            Build 5.0.0-2291 contains memcached commit 072764b50ab559101f05f2e1f7298f54c5ccfa43 with commit message:
            MB-22044: ewouldblock_engine_configure: Allow to pass key (2/3)
            https://github.com/couchbase/memcached/commit/072764b50ab559101f05f2e1f7298f54c5ccfa43

            build-team Couchbase Build Team added a comment - Build 5.0.0-2291 contains memcached commit 072764b50ab559101f05f2e1f7298f54c5ccfa43 with commit message: MB-22044 : ewouldblock_engine_configure: Allow to pass key (2/3) https://github.com/couchbase/memcached/commit/072764b50ab559101f05f2e1f7298f54c5ccfa43

            Build 5.0.0-2291 contains memcached commit a8389c0419c54cfb00056b5a64913617f5af2cea with commit message:
            MB-22044: Subdoc should detect and handle locked items (3/3)
            https://github.com/couchbase/memcached/commit/a8389c0419c54cfb00056b5a64913617f5af2cea

            build-team Couchbase Build Team added a comment - Build 5.0.0-2291 contains memcached commit a8389c0419c54cfb00056b5a64913617f5af2cea with commit message: MB-22044 : Subdoc should detect and handle locked items (3/3) https://github.com/couchbase/memcached/commit/a8389c0419c54cfb00056b5a64913617f5af2cea

            Mark Nunberg
            can you please verify and close them or assign to the respective qe if it needs a functional test case

            Thanks
            Prerna

            Prerna.Manaktala Prerna Manaktala (Inactive) added a comment - Mark Nunberg can you please verify and close them or assign to the respective qe if it needs a functional test case Thanks Prerna
            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