[DOCS-10329] Inaccurate documentation for getMore maxTimeMS option Created: 30/May/17  Updated: 30/Oct/23  Resolved: 18/Jul/23

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

Type: Task Priority: Major - P3
Reporter: Jeremy Mikola Assignee: Cory Bullinger
Resolution: Done Votes: 0
Labels: reopened, server-docs-bug-bash, triage
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to DOCS-9823 Document maxTimeMS option for all CRU... Closed
is related to DOCS-6620 Docs for getMore command maxTimeMS fi... Closed
Participants:
Days since reply: 1 year, 14 weeks, 1 day ago

 Description   

Documentation for the getMore command's maxTimeMS option states:

Optional. Specifies a time limit in milliseconds for processing operations on a cursor. If you do not specify a value for maxTimeMS, operations will not time out. A value of 0 explicitly specifies the default unbounded behavior.

This option corresponds to the maxAwaitTimeMS option in drivers (see: DRIVERS-272 and this comment from SERVER-15815).

I believe the second sentence is incorrect. If the driver has not specified the awaitData option for a tailable cursor, then a getMore should return immediately. If awaitData has been specified, then the server waits for a predefined amount (3.4 waits for one second according to my testing). Saying "operations will not time out" implies that the getMore may not return at all until there is new data to return, as does "default unbounded behavior" in the last sentence.

AFAIK, specifying zero for maxTimeMS is equivalent to not providing the option at all, which would have the server's default timeout kick in. In the C driver, there is logic to avoid setting maxTimeMS on getMore if the user supplied a value of zero. I expect other drivers do the same.



 Comments   
Comment by Sarah Olson [ 01/Nov/22 ]

Thanks jmikola@mongodb.com. Appreciate the update.

Comment by Jeremy Mikola [ 01/Nov/22 ]

The original text I cited in the OP is still in the current documentation. This still seems relevant.

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!

Comment by David Storch [ 31/May/17 ]

jmikola, your comment looks accurate. One other thing I'd like to point out is that maxTimeMS is not allowed on a getMore unless the getMore is issued against an awaitData cursor.

Comment by Jeremy Mikola [ 30/May/17 ]

david.storch: Can you fact-check my comments in the OP?

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