-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 4.0.4
-
Component/s: Replication, Write Ops
-
None
-
Major Change
-
ALL
-
v4.0
-
-
Repl 2019-01-14, Repl 2019-01-28, Repl 2019-02-11, Repl 2019-02-25
-
(copied to CRM)
Testing the bulkWrite DUP Key example from https://docs.mongodb.com/manual/reference/method/db.collection.bulkWrite/#bulk-write-operations in a transaction I can't find the writeErrors array in the result.
Server: 4.0.4-ent
WriteCommandError({ "operationTime" : Timestamp(1544613730, 3), "ok" : 0, "errmsg" : "E11000 duplicate key error collection: test.c index: _id_ dup key: { : 1.0 }", "code" : 11000, "codeName" : "DuplicateKey", "$clusterTime" : { "clusterTime" : Timestamp(1544613730, 3), "signature" : { "hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="), "keyId" : NumberLong(0) } } })
Thinking that perhaps this is a client side issue I looked at the wire protocol response and I don't see it there either
sudo tshark -nQ -i lo0 --enable-protocol "MONGO" -f "portrange 12108-12110" -Y "mongo.opcode==2013" -d "tcp.port==12108-12110,mongo" -t u -T json "mongo.msg.sections.section": { "mongo.msg.sections.section.kind": "0", "mongo.msg.sections.section.body": { "mongo.document.length": "268", "mongo.elements": { "mongo.element.name": "operationTime", "mongo.element.name_tree": { "mongo.element.type": "0x00000011", "mongo.element.value.int64": "6634065455302574083" }, "mongo.element.name": "ok", "mongo.element.name_tree": { "mongo.element.type": "0x00000001", "mongo.element.value.double": "0" }, "mongo.element.name": "errmsg", "mongo.element.name_tree": { "mongo.element.type": "0x00000002", "mongo.element.value.length": "77", "mongo.element.value.string": "E11000 duplicate key error collection: test.c index: _id_ dup key: { : 1.0 }" }, "mongo.element.name": "code", "mongo.element.name_tree": { "mongo.element.type": "0x00000010", "mongo.element.value.int": "11000" }, "mongo.element.name": "codeName", "mongo.element.name_tree": { "mongo.element.type": "0x00000002", "mongo.element.value.length": "13", "mongo.element.value.string": "DuplicateKey" }, "mongo.element.name": "$clusterTime", "mongo.element.name_tree": { "mongo.element.type": "0x00000003", "mongo.document": { "mongo.document.length": "88", "mongo.elements": { "mongo.element.name": "clusterTime", "mongo.element.name_tree": { "mongo.element.type": "0x00000011", "mongo.element.value.int64": "6634065455302574083" }, "mongo.element.name": "signature", "mongo.element.name_tree": { "mongo.element.type": "0x00000003", "mongo.document": { "mongo.document.length": "51", "mongo.elements": { "mongo.element.name": "hash", "mongo.element.name_tree": { "mongo.element.type": "0x00000005", "mongo.element.value.length": "20", "mongo.element.value.bytes": "00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00" }, "mongo.element.name": "keyId", "mongo.element.name_tree": { "mongo.element.type": "0x00000012", "mongo.element.value.int64": "0" } } } } } } } } } }
How do I identify failed items?
- is depended on by
-
SERVER-39175 Transactional bulkWrite error missing writeErrors (mongos)
- Closed
- related to
-
SERVER-39360 assert.commandWorked with writeError sets error code to object
- Backlog