[CDRIVER-2192] Implement Driver Sessions API Created: 18/Jun/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: |
|
||||||||||||||||||||||||||||||||||||||||||||||||
| Epic Link: | Cdriver MongoDB 3.6 Support | ||||||||||||||||||||||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
Conform to the Driver Session Spec. Start and end a client-side session, and gossip the clusterTime.
Respond to spec changes. The spec had said that we associate db / collection / gridfs objects with sessions, but now we're going to keep sessions separate, and pass a session as a parameter to each non-deprecated function that can use a session. Luckily, I think our "with_opts" functions will handle this without requiring a large number of new functions. The spec had made retryWrites a session option, now it's a client option. We had chosen not to implement session pooling, but pooling is practically a requirement now, because every command must be associated with some session (whether the user passes a session or not). Required changes:
|
| Comments |
| Comment by Githook User [ 12/Nov/17 ] |
|
Author: {'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}Message: |
| Comment by Githook User [ 09/Nov/17 ] |
|
Author: {'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}Message: |
| Comment by Githook User [ 09/Nov/17 ] |
|
Author: {'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}Message: |
| Comment by Githook User [ 08/Nov/17 ] |
|
Author: {'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}Message: |
| Comment by Githook User [ 08/Nov/17 ] |
|
Author: {'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}Message: Dead code. |
| Comment by Githook User [ 08/Nov/17 ] |
|
Author: {'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}Message: |
| Comment by Githook User [ 08/Nov/17 ] |
|
Author: {'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}Message: |
| Comment by Githook User [ 08/Nov/17 ] |
|
Author: {'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}Message: Update tests and examples to deal with endSessions command events during mongoc_client_destroy. |
| Comment by Githook User [ 08/Nov/17 ] |
|
Author: {'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}Message: Now that we use lsid everywhere, the test framework must auth even to |
| Comment by Githook User [ 08/Nov/17 ] |
|
Author: {'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}Message: |
| Comment by Githook User [ 08/Nov/17 ] |
|
Author: {'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}Message: |
| Comment by Githook User [ 08/Nov/17 ] |
|
Author: {'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}Message: |
| Comment by Githook User [ 08/Nov/17 ] |
|
Author: {'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}Message: |
| Comment by Githook User [ 08/Nov/17 ] |
|
Author: {'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}Message: |
| Comment by Githook User [ 07/Nov/17 ] |
|
Author: {'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}Message: |
| Comment by Githook User [ 07/Nov/17 ] |
|
Author: {'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}Message: |
| Comment by Githook User [ 07/Nov/17 ] |
|
Author: {'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}Message: |
| Comment by Githook User [ 07/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 [ 04/Nov/17 ] |
|
Author: {'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}Message: |
| Comment by Githook User [ 03/Nov/17 ] |
|
Author: {'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}Message: |
| Comment by Githook User [ 03/Nov/17 ] |
|
Author: {'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}Message: |
| Comment by A. Jesse Jiryu Davis [ 03/Nov/17 ] |
|
Right, implicit sessions aren't implemented yet. Only the things marked "done" are done =) I've updated the description to add your suggestions: We'll implement mongoc_bulk_operation_set_client_session, and we'll add examples for findAndModify with sessions. |
| Comment by Jeremy Mikola [ 03/Nov/17 ] |
|
jesse: I realized that implicit sessions were not implemented after debugging some odd test failures for retryable writes in
While working around this, I realized that mongoc_bulk_operation_t has a session field, but there is no setter. PHPC still relies on the mongoc_bulk_operation_t and methods like mongoc_bulk_operation_set_client(), so I think we'll definitely need a setter for the client session as well (to be added down in this section). Additionally, it looks like we may need some examples/documentation to demonstrate how to add "sessionId" to a find_and_modify_opts_t via mongoc_find_and_modify_opts_append(). I expect this will be similar to the process in test_find_and_modify_opts_write_concern(). |
| Comment by Githook User [ 03/Nov/17 ] |
|
Author: {'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}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 [ 26/Oct/17 ] |
|
Author: {'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}Message: Try 2: use circular doubly-linked list macros from utlist.h, rather than |
| Comment by Githook User [ 25/Oct/17 ] |
|
Author: {'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}Message: |
| Comment by Githook User [ 25/Oct/17 ] |
|
Author: {'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}Message: Now that we've implemented OP_MSG in the mock server we can test lsid |
| Comment by Githook User [ 12/Oct/17 ] |
|
Author: {'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}Message: Revert " 5cb9050e716f8793db25b719493783a1d6bf6524 |
| Comment by Githook User [ 11/Oct/17 ] |
|
Author: {'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}Message: |
| Comment by Githook User [ 11/Oct/17 ] |
|
Author: {'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}Message: |
| Comment by Githook User [ 09/Oct/17 ] |
|
Author: {'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}Message: |
| Comment by Githook User [ 05/Oct/17 ] |
|
Author: {'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}Message: |
| Comment by Jeremy Mikola [ 03/Oct/17 ] |
|
Observation while I was working on retryable writes: if mongoc_cmd_parts_assemble only adds "lsid" for OP_MSG, _mongoc_write_opquery likely doesn't need to take a session parameter nor assign it to parts.session. |
| Comment by Githook User [ 03/Oct/17 ] |
|
Author: {'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}Message: Spec change: both replica sets and mongos servers report $clusterTime. |
| Comment by Githook User [ 02/Oct/17 ] |
|
Author: {'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}Message: |
| Comment by Ramon Fernandez Marina [ 13/Sep/17 ] |
|
Author: {'username': u'ajdavis', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@mongodb.com'}Message: |
| Comment by Ramon Fernandez Marina [ 13/Sep/17 ] |
|
Author: {'username': u'ajdavis', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@mongodb.com'}Message: |
| Comment by Ramon Fernandez Marina [ 13/Sep/17 ] |
|
Author: {'username': u'ajdavis', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@mongodb.com'}Message: |
| Comment by Ramon Fernandez Marina [ 13/Sep/17 ] |
|
Author: {'username': u'ajdavis', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@mongodb.com'}Message: |
| Comment by Ramon Fernandez Marina [ 13/Sep/17 ] |
|
Author: {'username': u'ajdavis', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@mongodb.com'}Message: |
| Comment by Ramon Fernandez Marina [ 13/Sep/17 ] |
|
Author: {'username': u'ajdavis', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@mongodb.com'}Message: |
| Comment by Ramon Fernandez Marina [ 13/Sep/17 ] |
|
Author: {'username': u'ajdavis', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@mongodb.com'}Message: |
| Comment by Ramon Fernandez Marina [ 13/Sep/17 ] |
|
Author: {'username': u'ajdavis', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@mongodb.com'}Message: mongoc_collection_aggregate, in particular, was prone to merging |
| Comment by Ramon Fernandez Marina [ 13/Sep/17 ] |
|
Author: {'username': u'ajdavis', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@mongodb.com'}Message: |
| Comment by Ramon Fernandez Marina [ 13/Sep/17 ] |
|
Author: {'username': u'ajdavis', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@mongodb.com'}Message: |
| Comment by Ramon Fernandez Marina [ 13/Sep/17 ] |
|
Author: {'username': u'ajdavis', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@mongodb.com'}Message: |
| Comment by Ramon Fernandez Marina [ 13/Sep/17 ] |
|
Author: {'username': u'ajdavis', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@mongodb.com'}Message: Send $clusterTime to MongoDB 3.6 mongos from mongoc_collection_aggregate |
| Comment by Ramon Fernandez Marina [ 13/Sep/17 ] |
|
Author: {'username': u'ajdavis', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@mongodb.com'}Message: Now that we add "$clusterTime" to commands sent to MongoDB 3.6+ mongos |
| Comment by Ramon Fernandez Marina [ 13/Sep/17 ] |
|
Author: {'username': u'ajdavis', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@mongodb.com'}Message: |
| Comment by Ramon Fernandez Marina [ 13/Sep/17 ] |
|
Author: {'username': u'ajdavis', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@mongodb.com'}Message: |
| Comment by Ramon Fernandez Marina [ 13/Sep/17 ] |
|
Author: {'username': u'ajdavis', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@mongodb.com'}Message: |
| Comment by Ramon Fernandez Marina [ 13/Sep/17 ] |
|
Author: {'username': u'ajdavis', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@mongodb.com'}Message: |
| Comment by Ramon Fernandez Marina [ 12/Sep/17 ] |
|
Author: {'username': u'ajdavis', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@mongodb.com'}Message: Send $clusterTime to MongoDB 3.6 mongos from mongoc_collection_aggregate |
| Comment by Ramon Fernandez Marina [ 12/Sep/17 ] |
|
Author: {'username': u'ajdavis', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@mongodb.com'}Message: |
| Comment by Ramon Fernandez Marina [ 12/Sep/17 ] |
|
Author: {'username': u'ajdavis', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@mongodb.com'}Message: Send $clusterTime to MongoDB 3.6 mongos from mongoc_collection_aggregate |
| Comment by Ramon Fernandez Marina [ 12/Sep/17 ] |
|
Author: {'username': u'ajdavis', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@mongodb.com'}Message: Now that we add "$clusterTime" to commands sent to MongoDB 3.6+ mongos |
| Comment by Githook User [ 14/Jul/17 ] |
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}Message: |
| 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: Prepare to implement sessions and OP_MSG. |