[CDRIVER-662] Inconsistent errs from CRUD functions Created: 18/May/15 Updated: 19/Oct/16 Resolved: 18/Oct/16 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | Bulk API, errors, libmongoc |
| Affects Version/s: | None |
| Fix Version/s: | 1.5.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | A. Jesse Jiryu Davis | 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: |
|
||||||||||||||||
| Description |
|
Inserting a document larger than 16MB sometimes sets error.domain to MONGOC_ERROR_COMMAND with a legacy insert, sometimes MONGOC_ERROR_QUERY with an insert command. It should always be MONGOC_ERROR_BSON. mongoc_collection_insert, insert_bulk, update, and delete sometimes set error.domain to MONGOC_ERROR_COLLECTION, sometimes to MONGOC_ERROR_COMMAND. |
| Comments |
| Comment by Githook User [ 18/Oct/16 ] | |||||||||||||||||||||||||||||||||||
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}Message: mongoc_collection_insert, mongoc_collection_update, and mongoc_bulk_operation_execute continues to use MONGOC_ERROR_COMMAND for | |||||||||||||||||||||||||||||||||||
| Comment by A. Jesse Jiryu Davis [ 14/Oct/16 ] | |||||||||||||||||||||||||||||||||||
|
I need to update _mongoc_write_result_merge_legacy and _mongoc_write_result_complete() so they do not overwrite the mongoc_write_result_t's error domain once it's been set by too_large_error(). The legacy write error path is:
The write command error path is:
| |||||||||||||||||||||||||||||||||||
| Comment by A. Jesse Jiryu Davis [ 14/Oct/16 ] | |||||||||||||||||||||||||||||||||||
|
Here's a table of (error.domain, error.code) when calling various functions with an oversized document and the current code, 1.5.0-rc2:
| |||||||||||||||||||||||||||||||||||
| Comment by Githook User [ 11/Jul/15 ] | |||||||||||||||||||||||||||||||||||
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}Message: |