[SERVER-15042] Add noCursorTimeout option to command cursors Created: 26/Aug/14  Updated: 09/May/21  Resolved: 15/May/15

Status: Closed
Project: Core Server
Component/s: Aggregation Framework
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Major - P3
Reporter: A. Jesse Jiryu Davis Assignee: Unassigned
Resolution: Won't Fix Votes: 7
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Documented
is documented by DOCS-8995 Add noCursorTimeout option to command... Closed
Related
is related to SERVER-6036 Disable cursor timeout for cursors th... Closed
is related to SERVER-8188 Configurable idle cursor timeout Closed
Participants:

 Description   

The NoCursorTimeout bit in the OP_QUERY header prevents the server from closing a cursor that's idle for more than 10 minutes. Clients can set this bit if they may spend more than 10 minutes processing a batch of results.

The "aggregate" and "parallelCollectionScan" commands should allow the client to turn off cursor timeouts, too. The current syntax for specifying a cursor returned from aggregate is:

{
  aggregate: "collection",
  pipeline: [ ... ],
  cursor: { batchSize: 1000 }
} 

I propose adding:

{
    cursor: { batchSize: 1000, noTimeout: true }
}

Perhaps "timeout: false" is clearer, though less consistent with the query API.

"parallelCollectionScan" could include the option at the top level of the command spec:

{
  parallelCollectionScan: "collection",
  numCursors: 4,
  noTimeout: true
}

Prompted by this question:

http://stackoverflow.com/questions/24997404/cursor-not-found-when-using-parallel-scan-of-pymongo



 Comments   
Comment by Ian Whalen (Inactive) [ 15/May/15 ]

We intentionally do not support noCursorTimeout. The rationale for needing this will go away when we implement cursor keepalive. That work will be tracked in SERVER-6036.

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