[DRIVERS-198] Always use command cursor 'ns' value for OP_GET_MORE Created: 18/Dec/14  Updated: 15/Apr/19  Resolved: 08/Feb/16

Status: Closed
Project: Drivers
Component/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Bernie Hackett Assignee: Barrie Segal
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on RUBY-844 Always use command cursor 'ns' value ... Closed
depends on PYTHON-806 Always use command cursor 'ns' value ... Closed
depends on CXX-455 Ensure command cursors are instantiat... Closed
Driver Compliance:
Key Status/Resolution FixVersion
PYTHON-806 Done 2.8, 3.0
RUBY-844 Done 1.12
CXX-455 Done legacy-1.0.0-rc4

 Description   

Some drivers ignore the 'ns' field in the server's command cursor document for OP_GET_MORE. This hasn't resulted in any bug reports so far because the 'ns' value for an aggregate or parallelCollectionScan cursor is the same as the namespace of the collection running the command.

For example, in python:

>>> c.foo.bar.full_name
u'foo.bar'
>>> c.foo.command("aggregate", "bar", pipeline=[], cursor={})['cursor']['ns']
u'foo.bar'

However, the namespaces don't match for the new listCollections and listIndexes command. Again, in python:

>>> c.foo.bar.full_name
u'foo.bar'
>>> c.foo.command("listCollections", 'bar', cursor={})['cursor']['ns']
u'foo.$cmd.listCollections'

The purpose of this ticket is to ensure that all drivers always use the 'ns' value for OP_GET_MORE, regardless of the command.



 Comments   
Comment by Derick Rethans [ 19/Dec/14 ]

We use the returned value:

Generated at Thu Feb 08 08:20:59 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.