-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Documentation about pollingIntervalMs and pollingThrottleMs is unclear #7538
Comments
This was not the interval of sending messages to client. It's about the interval of the server's polling database. Also keep in mind that if you modify data on server instead of DB, changes happened immediately, too. |
Ok you closed it but is the documentation really correct? Is it really called pollingIntervalMs and pollingThrottleMs? If default for pollingInterval is 10s should it be set in ms or s (if I would like to poll db every every 20s should I set 20000 or 20)? And about pollingThrottle from documentation:
This is exactly what I want. If it doesn't work like that then I would say documentation is really misleading which is exactly what I wrote in title. |
slower updates to users there means slower direct DB update to users, not slower serverside updates to users, I think. The documentation is really unclear about this. Maybe add a link to the blog post you've mentioned? I'll reopen for other's thoughts. Oh I just remembered, docs issues should go to meteor/docs. So closing this and I will post this to meteor/docs. Thank you for your reporting and please continue there. |
Docs are correct, with the exception of those 10sec (should be 10 ms).
You have to disable oplog tailing. If you don't, you still get notified every time the MongoDB logs change. I tested this with an observer on the client and it worked.
|
OK that seems to be working, thanks! So the documentation problems would be:
|
@ignl Thanks for pointing this out. @n1mmy Can the blog be updated to change
I agree this could be more clear, but essentially when oplog isn't on (either because it's not available, or disabled), Meteor resorts to polling and these variables become relevant. Would it be more clear if the docs added the text "When not using oplog, " as follows (In JSDoc format)?:
Yes, 10s is the default for |
Yeah for point 2 I would say "When not using oplog (when it's not available or disableOplog: true is used)" or something like that should be good. For point 3 maybe it's better to use the same metric - ms. So it could be 10000ms (10s). |
…ions This change changes units to be consistent and more clearly indicates when these parameters come into play. Fixes meteor#7538
@theadactyl Perfect, thank you! PR #7800 is open to solve the outstanding documentation issue and this issue will close automatically when it is merged. Thanks, all. |
I am not sure if documentation is correct for Collection-find. In this blog post settings for Livedata optimization are called pollingInterval and pollingThrottle. Also I am not sure if default for pollingIntervalMs is really 10s? I tried various combinations but couldn't get it to work on meteor 1.4.0.1. Currently I try like this serverside:
messages.find({'metadata.thread': threadId}, {sort: {'date' : sort}, limit: limit, pollingThrottle: 12000, pollingInterval: 12000});
I expect a new message to be pushed to other client every 12s, but it seems meteor just updates them immediately anyway. Is this a correct way to do it?
The text was updated successfully, but these errors were encountered: