-
Notifications
You must be signed in to change notification settings - Fork 65
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
ottypes/json1 support #136
Comments
Unfortunately I can't say I'm particularly familiar with ShareDB's polling. It certainly does look like this code makes the assumption we're dealing only with It looks like this is just an optimisation path for Will try to discuss with @ericyhwang |
Good catch by the way! |
Yeah, Log pollution is annoying, so we can look into handling it gracefully instead of relying on a try/catch in sharedb core.
Shouldn't take too long too do, I'll take a look tomorrow. It would be nice to also have |
Great to hear, thanks for the prompt response! |
Found a potential bug while looking into it. sharedb's catch clause falls back to not polling, so because of the error, queries with json1 ops will never poll: Not polling means a subscribed query's results won't automatically pick up additions, removals, or reorders in the result list. Fixing the error here in sharedb-mongo would mean such queries with json1 would start correctly updating, though it would mean more DB queries. Separately, for sharedb, I think the default should be to poll. If the code can't definitely determine that it's ok to skip polling, then it should poll the query for updated results, just in case. @alecgibson - your thoughts? |
I can't say I'm super familiar with the query/polling code and data flows. The As far as defaulting to poll in |
Submitting operations using the
json1
syntax (directly or through helpers such asinsertOp
) fails theopContainsAnyField
check, which checks the existence of ap
field (which contains thepath
injson0
).Is it intended for
sharedb-mongo
to have built-in checks on thejson0
syntax?The call fails, but as mentioned in the comments, it is caught in
sharedb
and I don't see any side-effect apart from log pollution (for my usecase anyway).The text was updated successfully, but these errors were encountered: