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

Oplog observe driver is messing with my data. #1737

Closed
rickihastings opened this Issue Jan 7, 2014 · 4 comments

Comments

Projects
None yet
2 participants
@rickihastings

rickihastings commented Jan 7, 2014

Here is a sample of the code I'm using along with it's output. You can see the output from the first snippet is fine and mirrors the data set I see here http://i.imgur.com/vXS2BEQ.png.

https://gist.github.com/rickihastings/8307748.

The second lot destroys the channel object. I've no idea why it's doing this, and the oplog code is complex so I've spotted a few places where the document appears to be having some form of transformation done on it? Not sure why this is being done, even if I explicitly set transform to null it still breaks it.

@glasser

This comment has been minimized.

Member

glasser commented Jan 8, 2014

@rickihastings Thanks for the report. I'm definitely incredibly interested in tracking down any inconsistency between oplog observe driver and polling.

Do you think you can follow the suggestions at https://github.com/meteor/meteor/wiki/Contributing-to-Meteor#reporting-a-bug-in-meteor and give me a full reproduction recipe that I can run myself which will demonstrate the issue? This snippet of code is not enough for me to reproduce it on my own machine.

@glasser

This comment has been minimized.

Member

glasser commented Jan 8, 2014

Oh, huh, it is probably because of that length: 50 and is presumably related to #594. We really should get around to resolving that at some point (unfortunately the best idea involves swapping out the "underscore" library which is going to require a lot of QA).

I can look into ensuring that oplog doesn't make the situation worse than no oplog, though. (And a reproduction recipe still would be helpful.)

@glasser

This comment has been minimized.

Member

glasser commented Jan 8, 2014

Presumably fixed in bab936e (GitHub seems to be glitchy and didn't notice).

Can you test your app with meteor --release oplog-operators (a release I just cut which includes that fix as well as some other post-0.7.0.1 changes) and let me know if it fixes your problem?

@glasser glasser closed this Jan 8, 2014

@rickihastings

This comment has been minimized.

rickihastings commented Jan 8, 2014

Yep the meteor --release oplog-operators fixes the problem thanks for getting back promptly!

awwx pushed a commit to awwx/meteor that referenced this issue Jan 8, 2014

Patch _.each to not treat {length: 5} as an array
Specifically, in all Underscore "collection" functions which treat their
arguments polymorphically as either "object-like" or "array-like", don't
treat arguments with `x.constructor === Object` as arrays (except for
the 'arguments' object).

Fixes meteor#594. Fixes meteor#1737.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment