mongoS does not set 'useNewUpsert' on $mergeCursors pipelines [4.4, 4.2]

XMLWordPrintableJSON

    • Fully Compatible
    • ALL
    • v4.2
    • Query 2020-04-20, Query 2020-05-04
    • 50
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In SERVER-43860, we fixed the behaviour of $merge in the case where we have {whenMatched: pipeline} and {whenNotMatched: insert}. For upgrade/downgrade purposes, we made this new behaviour conditional on the presence of a flag, useNewUpsert, which is set by 4.4 mongoS on aggregations that are sent to the shards. We then backported this fix to 4.2.2.

      However, in cases where a $merge is sent to a shard as part of a $mergeCursors pipeline, the 'useNewUpsert' flag is not set on the command. In these scenarios, the old incorrect behaviour is still observed.

              Assignee:
              Bernard Gorman
              Reporter:
              Bernard Gorman
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: