[CDRIVER-625] expose CRUD spec mandated information in bulk write API if there is an error Created: 22/Apr/15  Updated: 21/May/15  Resolved: 21/May/15

Status: Closed
Project: C Driver
Component/s: Bulk API, libmongoc
Affects Version/s: 1.2.0
Fix Version/s: 1.2.0

Type: Improvement Priority: Major - P3
Reporter: Adam Midvidy Assignee: A. Jesse Jiryu Davis
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by CXX-583 implement CRUD API exception hierarchy Closed
Related
is related to CDRIVER-428 Support lastOp and electionId situati... Closed
is related to CDRIVER-651 writeError from bulk operation must i... Closed

 Description   

When implementing the CRUD spec's error handling portion in the C++11 driver (link: https://github.com/mongodb/specifications/blob/master/source/crud/crud.rst#error-handling) i found it was not possible to retrieve the information mandated by the spec in the case a bulk write error.

That is, in the case of an error it should be possible to retrieve:

  • the requests that were sent to the server
  • the requests that were not sent to the server
  • any errors that the server returned (including the request that triggered the error, and the index of the corresponding request in the original list of requests)

This would require a fairly large addition to the ABI, but it seems like it could be possible to do in a backwards compatible way.



 Comments   
Comment by A. Jesse Jiryu Davis [ 21/May/15 ]

Not documented, see CDRIVER-686, but the bson_t passed in as the "reply" pointer has its writeErrors and writeConcernError filled out if appropriate.

Comment by A. Jesse Jiryu Davis [ 22/Apr/15 ]

Understood.

Comment by Andrew Morrow (Inactive) [ 22/Apr/15 ]

Please note that this is a blocker for any driver attempting to implement the CRUD spec by wrapping the C driver.

Generated at Wed Feb 07 21:10:05 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.