[CDRIVER-2206] Expose is_default() in public API for read and write concerns Created: 10/Jul/17 Updated: 28/Oct/23 Resolved: 11/Jul/17 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | libmongoc |
| Affects Version/s: | None |
| Fix Version/s: | 1.7.0 |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Jeremy Mikola | Assignee: | A. Jesse Jiryu Davis |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Description |
|
When parsing a URI, libmongoc always sets a read concern and write concern on the resultant client object (even if the URI includes no such options). It later checks if those properties are default via the private _mongoc_read_concern_is_default() and _mongoc_write_concern_is_default() functions when it needs to decide if the global defaults should be injected into commands. Since PHPC is not using mongoc_client_read_write_command_with_opts()() and related functions at this time (and cannot until a general mongoc_client_command_with_opts() function is also introduced), application of these global options is handled in PHPLIB. However, PHPLIB currently injects default read and write concerns into its commands. Fixing this requires PHP to have some way to determine if a libmongoc client's read and write concern are actually defaults that should be ignored by PHPLIB. This missing feature was discovered in 1.7.0-rc0 and will be added in 1.7.0-rc1. |
| Comments |
| Comment by Ramon Fernandez Marina [ 12/Sep/17 ] |
|
Author: {'username': u'ajdavis', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@mongodb.com'}Message: New function mongoc_write_concern_is_default determines if any write |
| Comment by A. Jesse Jiryu Davis [ 11/Jul/17 ] |
|
On r1.7: https://github.com/mongodb/mongo-c-driver/commit/8fed50154d5d0176cd0166e6d955cbbf2784ac70 |
| Comment by Githook User [ 11/Jul/17 ] |
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}Message: New function mongoc_write_concern_is_default determines if any write |