-
Notifications
You must be signed in to change notification settings - Fork 5
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
MinimongoError: The positional operator did not find the match needed from the query #9
Comments
Aaaah - positional operators! Meteor has an incomplete implementation in mini-mongo |
I am taking a closer look as we speak - FYI |
Great, thanks! Gonna add a few more errors. I didn't actually test this one properly it seems. I've been laser-focused on the chats not updating, and those were all working pretty smooth hehe. |
Can you check your packages folder for the commit your are using of this lib? |
Sorry spoke too soon -- this is the offending line |
Currently on |
This is blocking me from using this package in a project. The offending query on my side is:
Also tried with
Without the Had to revert to Any progress on this issue yet @ramezrafla ? Error in my case:
|
@jasongrishkoff |
Hi @ramezrafla I actually stopped using this package back in February - there were too many issues, so I just went back to plain old oplog and scaled everything up. Unfortunately I can't test this for you :( |
@ramezrafla it still does not work. I made a quick monkey patch (works for only simple case) for myself which looks like this:
|
FYI, was playing around with the package and can confirm this still isn't working for me either. |
@jasongrishkoff |
Same error with the monkey patch. Code I'm firing looks kinda like this:
|
I'm having problems with the positional operator server side with:
The error is:
Going to need to revert to |
@JackAdams If it works, I'll make the chance and push to production |
Seems to have fixed the problem for me; no error and correct update made in the document in the db. This being the case, I'm going to forge ahead with |
Great! Will update and push to production shortly. |
Out of interest, @ramezrafla , have you managed to have tens of thousands of concurrent users, with multiple subscriptions each, making frequent writes, and still use mongo unsharded? |
Yes! That's the purpose of this package. No sharding yet. The cache within zegenie:redis-oplog dramatically reduces hits to the DB. Since each user is connected via websocket, we can keep their recurrent data. When we write to the DB, we don't need to repull (like original redis-oplog), we simply update the local cache. Which brings the next question, with positional operators in place, please check that the data in the client is also updated (not just DB). |
Happy to confirm that changes are being correctly propagated to the client after an update using the positional operator. |
Super happy to hear about the scalability. Even with |
Excellent! Theo handled a lot of the interfacing with redis and the internals of Meteor. There is a bit of hacking in there to override internal pub/subs. So he did all the heavy lifting. |
@ramezrafla . Maybe hold off pushing that patch to production. I just did and have a lot of users reporting issues. Will update when I know more. |
Been testing, and the fix for the issues I was seeing is to make sure the type is an array when trying to find the array index to use for the positional operator. (This is because I was using a string of dot separated fields to query nested objects, not arrays, which is a common enough practice, so the suggested fix to the patch below
This code block replaces:
Are you still using the original test suite, @ramezrafla ? |
Excellent @JackAdams I am not using the test suites, to simplify things. In hindsight, maybe a mistake. |
I've pushed that modified patch to production and so far, so good. I'll let you know if we run into any problems. |
Okay. Better not put that patch into production. It seems to be giving some false positives for the old version of |
I don't think it was anything to do with the patch, in the end. But this is really weird. On the Mongo console:
Which is what I expected. But in the Meteor shell and in my app code:
Which shouldn't be happening at all. This only happens when I've got Edit: sorry, I'll split this out into a separate issue (#25) The positional operator patch (with the guard condition with |
Here's the code throwing this error:
This is executed server-side, not on client.
Here's the full log:
The text was updated successfully, but these errors were encountered: