[CDRIVER-1448] private generic command function that supports writeConcern Created: 04/Aug/16 Updated: 10/Aug/16 Resolved: 05/Aug/16 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | libmongoc |
| Affects Version/s: | 1.4.0 |
| Fix Version/s: | 1.4.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Fiona Rowan | Assignee: | Fiona Rowan |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Description |
|
The following functions have been implemented in mongoc_collection_drop_with_write_concern When max_wire_version >=5, these functions need to return false (or some other indication of failure) on writeConcernError and parse the error. Create a new function: _mongoc_client_command_with_write_concern. Its code is just like mongoc_client_command_simple, except that, just before it calls _mongoc_client_command_with_stream:
...then it copies the command and appends the write concern to it. Call this new private function from all the "_with_write_concern" public functions. |
| Comments |
| Comment by Githook User [ 05/Aug/16 ] | |||||||||||
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@emptysquare.net'}Message: Merge pull request #382 from fionaRowan/
| |||||||||||
| Comment by Githook User [ 05/Aug/16 ] | |||||||||||
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@emptysquare.net'}Message: Merge pull request #382 from fionaRowan/
| |||||||||||
| Comment by Githook User [ 05/Aug/16 ] | |||||||||||
|
Author: {u'name': u'Fiona Rowan', u'email': u'fiona.rowan@10gen.com'}Message: | |||||||||||
| Comment by A. Jesse Jiryu Davis [ 04/Aug/16 ] | |||||||||||
|
I propose a new private function:
Since it's private we're not violating the decision from SPEC-619. Its code is just like mongoc_client_command_simple, except that, just before it calls _mongoc_client_command_with_stream, then
... it copies the command and appends the write concern to it. Call this new private function from all the "_with_write_concern" public functions. |