-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mongodb - use tailable cursors instead of polling #33
Comments
Correct me if I'm wrong, but wouldn't that limit the number of workers to one per queue or cursor? Also, there would need to be some work involved to make sure you didn't lose any jobs if the cursor closed I'm thinking. On Thursday, November 3, 2011 at 1:39 PM, Greg Weber wrote:
|
Yes, you will still need to modify members of the collection to mark them
|
That's a really interesting idea. It would be great if you could use a tailable cursor with the findAndModify command. Any idea how we could do this without creating contention between workers? |
You still have to use findAndModify to flag a document as finished Other articles on this approach:
[1] http://www.shtylman.com/archives/217 On Thu, Nov 3, 2011 at 1:38 PM, Brandon Keepers <
|
Hi all... I thought I'd drop by to say I've logged a feature request to have findAndModify return tailable cursors: https://jira.mongodb.org/browse/SERVER-11753 This would allow blocking reads instead of polling (via tailable cursors), plus the guarantee that only one consumer would get any given job (via findAndModify). Please vote for it if you're interested in this functionality. |
If anyone wants to tackle this feel free to create a new backend like tailable_mongo or something. |
The text was updated successfully, but these errors were encountered: