Closed switz closed 11 years ago
Godbox is driven by ShareJS directly, and racer sits on top of ShareJS. Thus, they should be seeing the same results. In both cases, queries come from MongoDB, but the data also needs to be in Redis to work properly.
I suspect this might be related to a bug in ShareJS that we fixed last night involving fetching a query and the documents in the query. Try installing ShareJS from the latest on GitHub to see if that helps:
$ cd ~/your_project/node_modules/derby/node_modules/racer/
$ npm install git://github.com/share/ShareJS.git#rewrite
Hm, that didn't work - unfortunately.
Here's what I've noticed – some weird behavior that I can't explain. If I breakpoint
on this console.log
, the objects in the array show up as undefined, except for the first doc.
However, once I click through that breakpoint and inspect that element again, the array eventually becomes fully hydrated:
Is it possible that sharejs thinks the operation is complete after finding the first document, instead of waiting for all of the documents to be found?
I should add that this appears to only happen in nested queries. When running it outside of the other query's callback it works as expected.
Yeah, this is definitely a bug. Working on it. For now, just use subscribe, which doesn't seem to have the same problem.
For some reason, this query only returns the first object in the array and the rest are undefined.
Using godbox, I can see that there are in fact quite a few documents that fit this query.
Any idea why this might be happening? I'm not utilizing any access control yet. Thanks
Edit: For more info, I notice sometimes it returns partial arrays and sometimes it returns empty arrays. Is it possible that the
igor
tool didn't import my mongo data to redis properly?Edit2: It appears to be consistently on each return, implying that it has little to do with the database interaction and more to do with missing or incomplete data. I assume
igor
didn't import all of my data to redis - which must mean thatgodbox
runs mostly off of mongo.