[CDRIVER-838] Support find, getMore and killCursor commands Created: 11/Sep/15 Updated: 16/Feb/16 Resolved: 16/Nov/15 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.3.0-beta0 |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | A. Jesse Jiryu Davis | Assignee: | A. Jesse Jiryu Davis |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Epic Link: | MongoDB 3.2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comments |
| Comment by Githook User [ 16/Feb/16 ] | |||||||||||||||||||||||||||||||||
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}Message: I introduced the function for This causes some duplication, however, and it makes it very hard to Remove mongoc_cluster_run_command_rpc and use the standard command path. | |||||||||||||||||||||||||||||||||
| Comment by Githook User [ 16/Nov/15 ] | |||||||||||||||||||||||||||||||||
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}Message: | |||||||||||||||||||||||||||||||||
| Comment by Githook User [ 16/Nov/15 ] | |||||||||||||||||||||||||||||||||
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}Message: | |||||||||||||||||||||||||||||||||
| Comment by Githook User [ 16/Nov/15 ] | |||||||||||||||||||||||||||||||||
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}Message: | |||||||||||||||||||||||||||||||||
| Comment by Githook User [ 16/Nov/15 ] | |||||||||||||||||||||||||||||||||
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}Message: | |||||||||||||||||||||||||||||||||
| Comment by Githook User [ 16/Nov/15 ] | |||||||||||||||||||||||||||||||||
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}Message: | |||||||||||||||||||||||||||||||||
| Comment by Githook User [ 11/Nov/15 ] | |||||||||||||||||||||||||||||||||
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}Message: | |||||||||||||||||||||||||||||||||
| Comment by Githook User [ 11/Nov/15 ] | |||||||||||||||||||||||||||||||||
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}Message: Also test find command with batchSize. | |||||||||||||||||||||||||||||||||
| Comment by Githook User [ 11/Nov/15 ] | |||||||||||||||||||||||||||||||||
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}Message: | |||||||||||||||||||||||||||||||||
| Comment by Githook User [ 10/Nov/15 ] | |||||||||||||||||||||||||||||||||
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}Message: Redundant with cursor->error. | |||||||||||||||||||||||||||||||||
| Comment by Githook User [ 10/Nov/15 ] | |||||||||||||||||||||||||||||||||
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}Message: | |||||||||||||||||||||||||||||||||
| Comment by Githook User [ 05/Nov/15 ] | |||||||||||||||||||||||||||||||||
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}Message: | |||||||||||||||||||||||||||||||||
| Comment by Githook User [ 05/Nov/15 ] | |||||||||||||||||||||||||||||||||
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}Message: | |||||||||||||||||||||||||||||||||
| Comment by A. Jesse Jiryu Davis [ 04/Nov/15 ] | |||||||||||||||||||||||||||||||||
|
You're right about $showRecordId, I'll update my comment. And yes, I'll need to deal with flags. Also skip, limit, batch size. | |||||||||||||||||||||||||||||||||
| Comment by Githook User [ 03/Nov/15 ] | |||||||||||||||||||||||||||||||||
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}Message: Preparation for implementing the "find" command. Cursors from commands (aggregate, listCollections, listDatabases) had This will get very tangled if "find" is a command, so I've created a The main advantage of this refactoring is that _mongoc_cursor_next is The next step will be to call the "find" command with this new function A subtle behavior change: the driver used to send the initial aggregate | |||||||||||||||||||||||||||||||||
| Comment by Hannes Magnusson [ 03/Nov/15 ] | |||||||||||||||||||||||||||||||||
|
I don't think we need to support
since that is a MongoDB 3.2 (e.g. find() command) feature, so legacy query documents wouldn't have it. The mongoc_query_flags_t flags will have to be rolled out too.. Does that need to happen irregardless $query was found in the query document? | |||||||||||||||||||||||||||||||||
| Comment by A. Jesse Jiryu Davis [ 02/Nov/15 ] | |||||||||||||||||||||||||||||||||
|
Quick spec on how to upgrade from old-style query documents like this:
to this:
Of course that's not an exhaustive list of the transformations. mongoc_collection_find doesn't take any separate arguments for "query" or "sort", much less for rarer options like maxTimeMS. The driver should upgrade from old- to new-style with logic like:
This logic is adapted from PyMongo's: We're not going to upgrade the "explain" command. This logic provides a clear upgrade path: old code still works in the great majority of common cases. Future code that knows it's talking to MongoDB 3.2+ can just send new-style find-command options to mongoc_collection_find. No ABI changes are required. Not yet shown : readConcern, that'll be another ticket. |