[SERVER-76999] Generate consistent errors for updating $merge with dollar fields document Created: 10/May/23 Updated: 30/Jan/24 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Rui Liu | Assignee: | Backlog - Query Execution |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Query Execution
|
||||||||
| Sprint: | QE 2023-06-26, QE 2023-07-10 | ||||||||
| Participants: | |||||||||
| Description |
|
Currently, $merge stage doesn't give a consistent result when the incoming document has dollar fields in it. For example, with (whenMatched: 'replace', whenNotMatched: 'insert') strategy, it may either trigger a DollarPrefixedFieldName error, or a FailedToParse error depending on whether the update is performed locally or remotely through an update command. The stage may also work for certain strategies like (whenMatched: 'keepExisting', whenNotMatched: 'insert'). We should come up with a way to return consistent results when there're dollar field documents in $merge. |