[CDRIVER-1918] mongoc_database_find_collections() and several generic "run command" helpers return cursors that are iterated using OP_GET_MORE on modern servers Created: 14/Nov/16  Updated: 06/Dec/16  Resolved: 06/Dec/16

Status: Closed
Project: C Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 1.6.0

Type: Bug Priority: Major - P3
Reporter: J Rassi 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:
Related

 Description   

Cursors returned by any of the following four API functions are iterated using legacy OP_GET_MORE wire protocol messages (if multiple batches are needed), even if the server supports the getMore command:

  • mongoc_database_find_collections()
  • mongoc_database_get_collection_names()
  • mongoc_client_command()
  • mongoc_database_command()
  • mongoc_collection_command()

This is due to the fact that the return value of _use_find_command() depends on the value of the "is_command" flag of the given cursor. The above API functions set the "is_command" flag on the cursors they return, and the return value of _use_find_command() is used as the decision for whether to send "get more" requests using OP_GET_MORE or the getMore command.



 Comments   
Comment by Githook User [ 06/Dec/16 ]

Author:

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

Message: CDRIVER-1918 use getMore for command cursors

We had incorrectly used OP_GETMORE to iterate command cursors, even with
a modern server that supports the "getMore" command.
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/85ac3ad24b46394924581365cae4fdbb879f5685

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