-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Order dependent issue populating documents that contain embedded discriminators and refPath #5858
Comments
I believe the issue is in |
For the second query, by the time that
This leads to an incorrect |
Thanks for the detailed repro script, will fix for 4.13.7 👍 |
Actually, that's strange, I can't reproduce this issue anymore, your test case succeeds against master now. I'm pretty baffled, I'm certain it was failing 2 days ago. Can you confirm you're still having this issue? |
Yes, I still see it on 2ecf938 from master.
|
Thanks for your patience, this issue proved very tricky to solve because it proved to be a subtle race condition that I couldn't repro consistently. Ended up being a one line fix. Fix will be in 4.13.8 👍 |
Wonderful! My attempted fixes were in lib/query, basically trying to clone downstream of where you did... knew it wasn't elegant enough to be right. Bravo. |
This is a bug in 4.13.5 and master (using node 7.4, mongodb 3.4).
For population of subdocuments with a discriminator and refPath, the leaf can populate with null depending on document order.
The following can be dropped into /test and run.
The text was updated successfully, but these errors were encountered: