[SERVER-604] Global (not connection dependend) cursors + Backward reading Created: 04/Feb/10  Updated: 04/Feb/10  Resolved: 04/Feb/10

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

Type: Improvement Priority: Major - P3
Reporter: Sascha Matzke Assignee: Eliot Horowitz (Inactive)
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

MongoDB / MacOS X


Participants:

 Description   

If I understand the documentation correctly a cursor is only valid in the context of a specific connection.

I'm using a pool of MongoDB connections and if a client pages trough the results I currently have to use skip/limit (which can become quite slow for bigger values of skip) because I can't depend on getting the same connection from the pool for every request.

So please add an option to make a cursor available globally for all connections.

Another nice feature to have would be the ability to use the cursor to not just read forward, but backwards to (Use-Case: User chooses to view previous result page).

I don't really know what the syntax for this could look like, because a negative value for "limit" is already used to invalidate the cursor in place.



 Comments   
Comment by Eliot Horowitz (Inactive) [ 04/Feb/10 ]

We don't want to do that as it could lead to large security holes.

If you need that kind of behavior, the best thing to do is remember the key on the index where you left off.

then to generate the next page, you do ( name > "eliot" ) or something

that works for forwards or backwards

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