I think the driver is just appending write concern errors from bulk ops to the same subdocument instead of appending subdocuments to an array of writeConcern errors:
{ "nInserted" : 3, "nMatched" : 0, "nModified" : 0, "nRemoved" : 0, "nUpserted" : 2, "upserted" : [ { "index" : 2, "_id" : { "$oid" : "55823de64c976b58533705d7" } }, { "index" : 3, "_id" : { "$oid" : "55823de64c976b58533705d8" } } ], "writeErrors" : [ ], "writeConcernError" : { "code" : 64, "errInfo" : { "wtimeout" : true }, "errmsg" : "waiting for replication timed out", "code" : 64, "errInfo" : { "wtimeout" : true }, "errmsg" : "waiting for replication timed out", "code" : 64, "errInfo" : { "wtimeout" : true }, "errmsg" : "waiting for replication timed out" } }
Besides, the field should be "writeConcernErrors" plural, only "code" and "errmsg" should be in each subdocument (not "errInfo"), and the bson_error_t should be filled out with a domain, code, and message.
- depends on
-
CDRIVER-845 Documents in array sent with insert command are all index 0
- Closed
- is depended on by
-
PHPC-436 Handle new writeConcernErrors array in mongoc_write_result_t
- Closed
- is related to
-
CDRIVER-492 mongoc never reports WriteConcern error
- Closed
-
CDRIVER-901 _mongoc_write_result_complete() does not populate bson_error_t from write concern errors
- Closed
- related to
-
PHPC-1683 Collect error labels from writeConcernErrors in libmongoc bulk write replies
- Closed