[CDRIVER-1117] Delete mongoc_cluster_run_command_rpc Created: 14/Feb/16  Updated: 10/Aug/16  Resolved: 16/Feb/16

Status: Closed
Project: C Driver
Component/s: libmongoc
Affects Version/s: 1.3.0
Fix Version/s: 1.4.0

Type: Improvement 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:
Depends
is depended on by CDRIVER-769 APM Internal API Closed

 Description   

Simplify the command-cursor path by calling the normal command function, mongoc_cluster_run_command. There's not much efficiency gained by the current mongoc_cluster_run_command_rpc and a lot of extra complexity.



 Comments   
Comment by Githook User [ 25/Feb/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: crash in cursor_array_prime

Unreleased code introduced with CDRIVER-1117.
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/06204f5eb02d4659a302416e09723c1da9369644

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: CDRIVER-1117 delete mongoc_cluster_run_command_rpc

I introduced the function for CDRIVER-838 to implement "find"/"getMore"
commands – the cursor was built to send and receive RPCs, so it was
easier to stick a find or getMore command into an RPC and send it,
instead of using the standard command path from the cursor code.

This causes some duplication, however, and it makes it very hard to
consistently record command events originating from cursors and those
that don't (CDRIVER-769).

Remove mongoc_cluster_run_command_rpc and use the standard command path.
When a cursor runs a command, it no longer stores the reply in its rpc
struct; instead it stores the reply in a bson_t on its iface_data.
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/dd115e8e2c22eb68dc1b47bbc57740520ee42244

Generated at Wed Feb 07 21:11:37 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.