[CDRIVER-687] Add processedRequests and unprocessedRequests to bulk operation reply Created: 21/May/15  Updated: 03/May/17  Resolved: 14/Jun/15

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

Type: New Feature Priority: Major - P3
Reporter: A. Jesse Jiryu Davis Assignee: A. Jesse Jiryu Davis
Resolution: Won't Fix 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

 Description   

https://github.com/mongodb/specifications/blob/master/source/crud/crud.rst#error-handling



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

In other words (you don't have to read all that) - the spec author says that "optional" in the case of processedRequests and unprocessedRequests means OPTIONAL - we don't have to implement them if we choose not to.

Comment by A. Jesse Jiryu Davis [ 15/Jun/15 ]

From Flowdoc:

Jesse Jun 8, 2015 3:02 PM
Craig, when you say that a BulkWriteException's processedRequests and unprocessedRequests fields are optional
https://github.com/mongodb/specifications/blob/master/source/crud/crud.rst#error-handling
does that mean optional for me to implement or not, depending on how onerous it is & whether i like them?
 
Craig
yes
 
Jesse
oh neat!
 
Craig
Bernie made me make it that way :)
 
Jesse
i see pymongo doesn't have them
it seems unclear to me reading the spec if we're talking optional in the RFC sense
"either don't implement it, or implement it like this"
or if you mean it in like a functional programming Maybe<Thing> sense
 
Craig
:)
right... I should figure out how to clear that up
optional in the spec always means the RFC version
those are indications to you as a read of the spec
 
Jesse
great
 
Craig
at least, on the result types
on the input types, it means the reverse
I need to fix that

Comment by Adam Midvidy [ 15/Jun/15 ]

jesse, I had thought 'optional' meant optional in the sense that not all errors would have unprocessedRequests (i.e. if all requests were sent to the server) - not optional in in the sense of MAY (i.e. as used in RFCs). I see that you have filed a SPEC ticket for that ambiguity. I am fine with not providing these fields in the C++ driver if the spec does not actually mandate them.

Comment by A. Jesse Jiryu Davis [ 08/Jun/15 ]

adam.midvidy the spec calls these fields "optional":

https://github.com/mongodb/specifications/blob/master/source/crud/crud.rst#error-handling

I asked craiggwilson for clarification and he says they need not be implemented. I notice that PyMongo doesn't have processed / unprocessedRequests and there's plan to implement them.

Unless you're attached to putting these fields in the C+11 driver's exception objects, I'd say let's not implement this in C+11 nor in C.

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