[CDRIVER-2331] New "with_opts" functions to accept sessionId Created: 22/Oct/17 Updated: 28/Oct/23 Resolved: 09/Nov/17 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | libmongoc |
| Affects Version/s: | None |
| Fix Version/s: | 1.9.0 |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | A. Jesse Jiryu Davis | 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 |
|
The Driver Sessions Spec requires all functions that communicate with the server to accept a session parameter. We'll do this in the C Driver by accepting an arbitrary BSON document called "opts" that can include a variety of options, including a session. Details: Users create sessions with mongoc_client_start_session and bind the session to an opts document. A new function mongoc_client_session_append (mongoc_client_session_t *, bson_t *) appends an opaque integer id to the opts document, with the field name "sessionId". When the driver executes a command with opts, the driver checks the opts for a "sessionId", retrieves the mongoc_client_session_t from a list of them in the mongoc_client_t, and adds the session's lsid and (if causally consistent) its clusterTime to the command it sends to the server. Make a list of every public function in the driver that does not end with "_with_opts". Remove from the list any functions that have a "_with_opts" equivalent. Remove any that don't communicate with the server. For all remaining functions, add a "_with_opts" equivalent and test it in test-mongoc-client-session.c. Done: Remove some workarounds from test-mongoc-client-session.c, like the direct call to the "insert" command (works around the current lack of mongoc_collection_insert_with_opts) and the "suspend_monitoring" field used in tests.
The generic command function is split out into Don't do mongoc_database_create_user_with_opts, mongoc_database_remove_all_users_with_opts, or mongoc_database_remove_user_with_opts. Same justification as when we cancelled |
| Comments |
| Comment by Githook User [ 11/Dec/17 ] |
|
Author: {'name': 'Jeremy Mikola', 'email': 'jmikola@gmail.com', 'username': 'jmikola'}Message: |
| Comment by Githook User [ 11/Dec/17 ] |
|
Author: {'name': 'Jeremy Mikola', 'email': 'jmikola@gmail.com', 'username': 'jmikola'}Message: |
| Comment by Githook User [ 12/Nov/17 ] |
|
Author: {'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}Message: |
| Comment by Githook User [ 12/Nov/17 ] |
|
Author: {'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}Message: |
| Comment by Githook User [ 06/Nov/17 ] |
|
Author: {'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}Message: |
| Comment by Githook User [ 06/Nov/17 ] |
|
Author: {'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}Message: |
| Comment by Githook User [ 06/Nov/17 ] |
|
Author: {'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}Message: |
| Comment by Githook User [ 05/Nov/17 ] |
|
Author: {'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}Message: |
| Comment by Githook User [ 04/Nov/17 ] |
|
Author: {'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}Message: Now that we can call "insert" with an lsid, no need to call the "insert" |
| Comment by Githook User [ 04/Nov/17 ] |
|
Author: {'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}Message:
|
| Comment by Githook User [ 04/Nov/17 ] |
|
Author: {'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}Message: |
| Comment by Githook User [ 04/Nov/17 ] |
|
Author: {'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}Message: New insert function that accepts sessionId and other options. |
| Comment by Githook User [ 01/Nov/17 ] |
|
Author: {'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}Message: |
| Comment by Githook User [ 01/Nov/17 ] |
|
Author: {'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}Message: |
| Comment by Githook User [ 01/Nov/17 ] |
|
Author: {'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}Message: |
| Comment by Githook User [ 30/Oct/17 ] |
|
Author: {'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}Message: |
| Comment by Githook User [ 30/Oct/17 ] |
|
Author: {'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}Message: |
| Comment by Githook User [ 30/Oct/17 ] |
|
Author: {'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}Message: |
| Comment by Githook User [ 30/Oct/17 ] |
|
Author: {'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}Message: |
| Comment by Githook User [ 29/Oct/17 ] |
|
Author: {'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}Message: |
| Comment by Githook User [ 29/Oct/17 ] |
|
Author: {'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}Message: |
| Comment by Githook User [ 28/Oct/17 ] |
|
Author: {'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}Message: |
| Comment by Githook User [ 28/Oct/17 ] |
|
Author: {'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}Message: |
| Comment by Githook User [ 28/Oct/17 ] |
|
Author: {'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}Message: |