Latest Atlas update just broke a query that worked fine for a long time
This is a db.aggregate() pipeline that starts with a $documents stage and ends with a $merge stage using whenMatched sub-pipeline to reconcile new/existing versions of the document
This whenMatched sub-pipeline includes this $addFields stage that now throws this error. This seems like a wrong behavior because $addFields refers to the sub-pipeline that has proper collection namespace and not the high-level {aggregate: 1} pipeline
Could someone look into this and hopefully hotfix this error check ASAP?
Thanks for filing this JIRA as critical. Any idea if/when we could have a hotfix? What is the typical release timeframe (with push to Atlas) for bugs like this?
After the fix is implemented, it may take a few weeks to get to Atlas, hard to say now.
If you can’t wait, I’d suggest using a workaround, e.g., substituting $documents with something like: