Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-76999

Generate consistent errors for updating $merge with dollar fields document

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • QE 2023-06-26, QE 2023-07-10

      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.

            Assignee:
            backlog-query-execution [DO NOT USE] Backlog - Query Execution
            Reporter:
            rui.liu@mongodb.com Rui Liu
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: