[DOCS-8125] Wire protocol documentation should note that OP_GET_MORE's numberToReturn must be non-negative Created: 17/Jun/16  Updated: 30/Oct/23

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Improvement Priority: Major - P3
Reporter: David Storch Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
documents SERVER-20808 Server should reject negative ntoretu... Closed
Related
related to DOCS-7296 Missing OpCodes in Wire Protocol Docu... Closed
is related to JAVA-2231 Legacy driver sends nToReturn of -1 f... Closed
Participants:
Days since reply: 1 year, 14 weeks, 2 days ago
Epic Link: DOCSP-1769

 Description   

The wire protocol documentation for OP_GET_MORE (https://docs.mongodb.com/manual/reference/mongodb-wire-protocol/#wire-op-get-more) says the following about numberToReturn:

Limits the number of documents in the first OP_REPLY message to the query. However, the database will still establish a cursor and return the cursorID to the client if there are more results than numberToReturn. If the client driver offers ‘limit’ functionality (like the SQL LIMIT keyword), then it is up to the client driver to ensure that no more than the specified number of document are returned to the calling application. If numberToReturn is 0, the db will used the default return size.

This should be extended to mention that numberToReturn should be non-negative. In version 3.3.1, under SERVER-20808, we added validation which will cause the server to return an error if it receives an OP_GET_MORE with a negative numberToReturn. Previous versions of the server did not implement valid semantics for negative numberToReturn, but also failed to reject it.



 Comments   
Comment by Sarah Olson [ 31/Oct/22 ]

Thanks for the confirm david.storch@mongodb.com!

Comment by David Storch [ 31/Oct/22 ]

This looks ok to close. OP_GET_MORE was deprecated in 5.0 and removed in 5.1. See PM-912.

Comment by Education Bot [ 31/Oct/22 ]

Hello! This ticket has been closed due to inactivity. If you believe this ticket is still important, please reopen it and leave a comment to explain why. Thank you!

Generated at Thu Feb 08 07:55:41 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.