[SERVER-8971] DBClientCursor returns a getMore() error as a result (in some cases) Created: 13/Mar/13  Updated: 06/Dec/22  Resolved: 19/Nov/21

Status: Closed
Project: Core Server
Component/s: Internal Client, Shell
Affects Version/s: 2.2.3
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Greg Studer Assignee: Backlog - Server Tooling and Methods (STM) (Inactive)
Resolution: Won't Fix Votes: 0
Labels: cxxcopy, move-stm
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File sharded_getmore_failover.js    
Issue Links:
Depends
is depended on by SERVER-8940 remove2.js failing on 2.2 branch Closed
Assigned Teams:
Server Tooling & Methods
Operating System: ALL
Steps To Reproduce:

SERVER-8940 fails with a count error because of this problem.

Participants:

 Description   

In at least some cases, the DBClientCursor treats an error on getMore() as a query result, returns it to the client as a document, and stops iterating the cursor. There isn't any indication to the client, at least to a mongo shell client, that the invalid getMore document is not just a document in the collection.

see DBClientCursor::dataReceived - the error is flagged, but this does not affect what is returned.

Unclear if this affects master.



 Comments   
Comment by Scott Hernandez (Inactive) [ 18/Mar/13 ]

Looks like we need to expose the results flag so we can check for query_error(s): http://docs.mongodb.org/meta-driver/latest/legacy/mongodb-wire-protocol/#wire-op-reply

Or we should test in C++ and throw if there is one.

Comment by Greg Studer [ 14/Mar/13 ]

Looks like this is partially WAD, but the shell doesn't seem to do the right thing in some cases.

Generated at Thu Feb 08 03:18:57 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.