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

Insert through subdoc operations gives cas mismatch error when document already exist

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 3.1.1
    • 3.1.0
    • None
    • 1

    Description

      Libcouchbase returns Cas mismatch error for insert done through subdoc operations(lcb_subdoc).
      https://github.com/couchbase/libcouchbase/blob/ed8b57e731e04e2749393c8bed8f9eb88d5d663d/src/handler.cc#L264
      Here libcouchbase checks for opcode as CMD_ADD(0x02) but subdoc operation set opcode to MULTI_MUTATE(0xd1) and insert/replace/upsert is set as command flags.
      https://github.com/couchbase/libcouchbase/blob/ed8b57e731e04e2749393c8bed8f9eb88d5d663d/src/operations/subdoc.cc#L871

      This issue breaks backward compatibility for eventing. And also shows different behaviour in 7.0.0 with different bucket binding insert(which uses normal lcb_store insert) and source bucket binding insert(which uses lcb_subdoc insert).

      Attachments

        Activity

          People

            avsej Sergey Avseyev
            ankit.prabhu Ankit Prabhu
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              PagerDuty