[CDRIVER-4244] Use OP_MSG for exhaust cursors on 4.2+ servers Created: 17/Dec/21  Updated: 28/Oct/23  Resolved: 25/Sep/23

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

Type: Improvement Priority: Unknown
Reporter: Kevin Albertson Assignee: Adrian Dole
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to DRIVERS-535 Support Exhaust Cursor in OP_MSG Closed
is related to SERVER-62147 Exhaust query using the OP_QUERY prot... Closed
is related to CDRIVER-4130 Allow exhaust cursor to fallback to n... Closed
Quarter: FY24Q3

 Description   

Background and motivation
5.1+ servers do not support exhaust cursors over OP_QUERY. CDRIVER-4130 changed the exhaust cursor implementation to fallback to a non-exhaust cursor on 5.1 servers.

This is permitted by the Find, getMore and killCursors commands. specification:

Server version Driver behavior
4.0 and earlier Drivers MUST use legacy OP_QUERY.
4.2 to 5.0 Drivers SHOULD use OP_MSG but MAY use legacy OP_QUERY.
5.1 and later Drivers MUST only use OP_MSG. Alternatively, drivers MAY fallback to a non-exhaust cursor when an exhaust cursor is requested.

See PyMongo for a reference implementation of Exhaust Cursors with OP_MSG: PYTHON-1636.

Scope

  • Satisfy the "SHOULD" statement for server 4.2 to 5.0. Implement exhaust cursors with OP_MSG.
  • Do not fallback to a non-exhaust cursors on 5.1.


 Comments   
Comment by Githook User [ 21/Sep/23 ]

Author:

{'name': 'Adrian Dole', 'email': 'adrian@dole.tech', 'username': 'adriandole'}

Message: CDRIVER-4244 use OP_MSG for exhaust cursors (#1399)

Use OP_MSG exhaust for mongod >= 4.2. Enable exhaust cursors for mongos >= 7.1.
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/1c8da0ee199661a4276c87fb9ec2fbb375a2a4ad

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