[CDRIVER-3147] CodeNames for command errors not reported in reply of write operations Created: 22/May/19 Updated: 10/Feb/23 |
|
| Status: | Blocked |
| Project: | C Driver |
| Component/s: | libmongoc |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Patrick Freed | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||
| Epic Link: | CDRIVER-4576 | ||||||||||||||||||||||||||||||||
| Description |
|
According to this comment on e.g. the following code sample
Fails and produces the following output:
For reference, the shell does accurately report a "BadValue" codeName:
|
| Comments |
| Comment by Jeremy Mikola [ 14/Nov/22 ] |
|
kevin.albertson@mongodb.com: Linking this up with On that note, do you think the approach in |
| Comment by Kevin Albertson [ 02/Feb/21 ] |
|
Re-opening, pending spec changes to clarify how command errors should be returned in write operations (DRIVERS-1547). |
| Comment by Kevin Albertson [ 25/Jan/21 ] |
| Comment by Kevin Albertson [ 30/Nov/20 ] |
|
Thank you for the heads up. libmongoc's transaction spec runner infers the code name from the code. I don't think we'll block the unified test runner on this ( |
| Comment by Kaitlin Mahar [ 22/Nov/20 ] |
|
Note: I just encountered this while implementing the unified test runner - kevin.albertson I expect you will encounter it as well, in particular on the test "remain pinned after non-transient Interrupted error on insertOne" from file "poc-transactions-mongos-pin-auto". (At least that's the first place I've run into it.) It looks like we did encounter it as well while implementing the transactions runner, however due to the loose way in which we wrote code name matching (to allow either a matching code name or a missing code name) to account for SERVER-36755 we did not notice it. |
| Comment by Kevin Albertson [ 03/Jun/19 ] |
|
Also worth considering how we report bulk write errors (e.g. if second command in batch fails, or there are multiple errors in an unordered bulk write, how do we report it?) |
| Comment by Patrick Freed [ 24/May/19 ] |
|
I came across this when adding codeName to our error types, but it looks like we'll encounter the same issue when implementing the transactions spec test runner. |
| Comment by Jeremy Mikola [ 24/May/19 ] |
|
patrick.freed: Did you come across this while trying to implement the errorCodeName assertion in the Transactions spec test runner? I believe I ran into the same roadblock with |