[DOCS-6620] Docs for getMore command maxTimeMS field should specify awaitData behavior Created: 19/Nov/15  Updated: 31/May/17  Resolved: 08/Dec/15

Status: Closed
Project: Documentation
Component/s: Server
Affects Version/s: None
Fix Version/s: 01112017-cleanup

Type: Improvement Priority: Major - P3
Reporter: David Storch Assignee: Ravind Kumar (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on MONGOSH-273 cursor maxAwaitTimeMS Closed
is depended on by CDRIVER-992 Link to server "maxAwaitTimeMS" manua... Closed
Related
related to DOCS-10329 Inaccurate documentation for getMore ... Closed
Participants:
Days since reply: 8 years, 10 weeks, 1 day ago

 Description   

The reference page for the getMore command in 3.2 includes the following documentation for the maxTimeMS field:

maxTimeMS | positive integer | Optional. The timeout duration in milliseconds.

This is accurate, but incomplete. The maxTimeMS field is only legal for getMore on awaitData cursors. An error will be returned to the user if maxTimeMS is attached to a getMore command on a non-capped, non-tailable, or non-awaitData cursor. Furthermore, the timeout is not used to throw an error if the operation exceeds its allotted time; instead, the timeout is the amount of time for which the getMore operation will block waiting for new data to be inserted into the capped collection.



 Comments   
Comment by Githook User [ 08/Dec/15 ]

Author:

{u'username': u'rkumar-mongo', u'name': u'ravind', u'email': u'ravind.kumar@10gen.com'}

Message: DOCS-6620 : getMORE maxTimeMS should specify awaitData behavior

Signed-off-by: kay <kay.kim@10gen.com>
Branch: master
https://github.com/mongodb/docs/commit/78820e8b798660745ea0ef232a333c829ca2d1e7

Comment by Ravind Kumar (Inactive) [ 08/Dec/15 ]

https://github.com/mongodb/docs/pull/2444

Comment by A. Jesse Jiryu Davis [ 02/Dec/15 ]

Note that in drivers this option, for getMore specifically, is called maxAwaitTimeMS, with "Await" in the word. This driver option is distinct from "maxTimeMS" which does not have "Await" in it.

It's a funny option: it's called maxAwaitTimeMS in the driver, but passed to the server as "maxTimeMS" with the getMore command, only for a tailable cursor with awaitData=true:

https://github.com/mongodb/specifications/blob/master/source/find_getmore_killcursors_commands.rst#semantics-of-maxtimems-for-a-driver

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