Details
-
Bug
-
Resolution: Fixed
-
Critical
-
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).