Couchbase Java SDK's(v2.7.1) Sub-Document API dropping mutations/operations

We are using Couchbase’s Java SDK(v2.7.1). While performing sub-document operations(mutations) it seems couchbase is dropping some of the mutations mid-way and hence only half of the changes are being reflected in the actual document

Eg:
Original Document:
{ "type": "example", "Id": "123", "fragments": { "1": { "stages": [ "A" ], "fragmentStages": { "A": { "code": 200, "timestamp": 1571659549 } } }, "2": { "stages": [ "A" ], "fragmentStages": { "A": { "code": 200, "timestamp": 1571659549033 } } } } }

Now after making mutations to following paths in a single operation:
(consider the following value is set : SubdocOptionsBuilder.builder().createPath(true))
append(fragments.1.stages, “B”)
upsert(fragments.1.fragmentStages.B, someObjectValue)
append(fragments.1.stages, “C”)
upsert(fragments.1.fragmentStages.C, someObjectValue)
append(fragments.2.stages, “B”)
upsert(fragments.2.fragmentStages.B, someObjectValue)
append(fragments.2.stages, “C”)
upsert(fragments.2.fragmentStages.C, someObjectValue)
append(fragments.2.stages, “D”)
upsert(fragments.2.fragmentStages.D,someObjectValue)

We observe that only some of the mutations are successful(couchbase API throws NO ERRORs), rest operations were somehow lost, so for example, the resultant document could be as follows:
{ "type": "example", "Id": "123", "fragments": { "1": { "stages": [ "A", "B" ], "fragmentStages": { "A": { "code": 200, "timestamp": 1571659549 }, "B": { "code": 200, "timestamp": 1571659549022 }, "C": { "code": 500, "timestamp": 1571659549033 } } }, "2": { "stages": [ "A", "B", "D" ], "fragmentStages": { "A": { "code": 200, "timestamp": 1571659549033 }, "C": { "code": 200, "timestamp": 1571659549033 }, "D": { "code": 500, "timestamp": 1571659549033 } } } } }

Hey @anshul

I can’t see how that could happen, from your code. On the server-side, the gets the document, applies all the changes to that in-memory version, and only stores it if all operations succeeded: e.g. it’s an atomic all-or-nothing operation. Is it possible that another actor has concurrently modified the document?

If not, any chance you could supply a small self-contained project that replicates this for us to look at further?