[CDRIVER-2332] New "with_opts" functions to support sessions with GridFS Created: 24/Oct/17 Updated: 13/Jan/20 Resolved: 13/Jan/20 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | GridFS |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | A. Jesse Jiryu Davis | Assignee: | Unassigned |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
For GridFS functions that do not accept generic "opts" in a bson_t, add new "with_opts" functions. This will allow applications to pass sessionId to GridFS functions. Deprecate superseded functions. There are two options: continue to invest in our current GridFS API, which does not conform to the GridFS Spec, by adding the following variants:
Update the documentation for mongoc_collection_get_last_error. This will make it easy for existing GridFS applications to use sessions. It preserves spec-violating features that applications depend on, such as mutable GridFS files. The other, probably superior option is to deprecate our entire GridFS API and create a new spec-conforming one. This new API will be the only way to use sessions with GridFS in the C Driver. Applications that use the C Driver's GridFS API are probably few, and they will have a small number of integration points with the API, and they will need to make code changes to use sessions with GridFS no matter what. Requiring some additional code changes is worth the cost in exchange for matching the GridFS Spec. The big obstacle is the loss of writable GridFS files; but I hope that applications can adapt to use the standard GridFS file versioning scheme instead. |
| Comments |
| Comment by Kevin Albertson [ 13/Jan/20 ] |
|
Additionally, the new spec compliant mongoc_gridfs_bucket_* API accepts bson_t options. If SPEC-921 requires adding sessions/transactions/causal consistency, there may be no API change required. |
| Comment by April Schoffer [ 13/Jan/20 ] |
|
SPEC-921 will sort out session support for the spec compliant GridFS API and we won't need this ticket. |
| Comment by A. Jesse Jiryu Davis [ 04/May/18 ] |
|
Probably not do this ticket, in favor of |