[CSHARP-3021] GetMore commands are not sent with the namespace returned in the last batch. Created: 23/Mar/20  Updated: 28/Oct/23  Resolved: 20/Apr/20

Status: Closed
Project: C# Driver
Component/s: Wire Protocol
Affects Version/s: None
Fix Version/s: 2.10.4, 2.11.0

Type: Bug Priority: Major - P3
Reporter: Craig Wilson Assignee: Mikalai Mazurenka (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
related to PYTHON-2182 Cursor namespace is ignored Closed
is related to RUBY-2211 Use namespace returned from find comm... Closed
Backwards Compatibility: Fully Compatible

 Description   

Atlas Data Lake doesn't use traditional namespaces when returning cursor results. For example, a find or aggregate command on the "test.foo" namespace will not have the "test.foo" in the resulting "ns" field of the result. As such, the driver is failing to issue getMore requests because it uses the incorrect namespace.

It appears that ListIndexes does this properly: https://github.com/mongodb/mongo-csharp-driver/blob/7cd604ab4fee1c3a02fd56e7b3f99215055785f4/src/MongoDB.Driver.Core/Core/Operations/ListIndexesUsingCommandOperation.cs#L169

The others 2 places I found were Find and Aggregate which seem like they just need to be updated:
https://github.com/mongodb/mongo-csharp-driver/blob/4bd195c198397a9ef4ca0f90a84652fdadfea216/src/MongoDB.Driver.Core/Core/Operations/AggregateOperation.cs#L403
https://github.com/mongodb/mongo-csharp-driver/blob/7a2af91bb400ca23e2ec8cd0d14accc7b14908fa/src/MongoDB.Driver.Core/Core/Operations/FindCommandOperation.cs#L490



 Comments   
Comment by Githook User [ 20/Apr/20 ]

Author:

{'name': 'Mikalai Mazurenka', 'email': 'mikalai.mazurenka@mongodb.com', 'username': 'MikalaiMazurenka'}

Message: CSHARP-3021: GetMore commands are not sent with the namespace returned in the last batch
Branch: v2.10.x
https://github.com/mongodb/mongo-csharp-driver/commit/b81b51a8b97938fb5b138763589d6a2181cdb276

Comment by Githook User [ 20/Apr/20 ]

Author:

{'name': 'Mikalai Mazurenka', 'email': 'mikalai.mazurenka@mongodb.com', 'username': 'MikalaiMazurenka'}

Message: CSHARP-3021: GetMore commands are not sent with the namespace returned in the last batch
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/ddbf5052cbf5c1b9bae1118ebf81c05e4029b2ed

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