With CDRIVER-710, mongoc_write_result_t now stores an array of writeConcernErrors. As I was updating PHPC for this API change, I traced how write concern errors are reported, since we need to turn those bson_error_t output variables into exceptions.
I traced the logic from mongoc_bulk_operation_execute() through to _mongoc_write_result_complete() and it appears that the bson_error_t is only ever set from write errors; however, the function may still return false for either !result->failed or bson_empty0 (&result->writeConcernErrors) (which is equivalent to checking for a non-zero result.n_writeConcernErrors value).
I can't speak for the !result->failed case, but I believe we want to integrate mongos' write concern error merging logic here, which I would otherwise need to do in PHPC-434 and HHVM-112.
- is depended on by
-
PHPC-434 WriteResult should merge multiple write concern errors
- Closed
- related to
-
CDRIVER-710 Wrong writeConcernErrors format
- Closed