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

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

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v4.2
    • Sprint:
      Query 2020-04-20, Query 2020-05-04
    • Linked BF Score:
      50

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              bernard.gorman Bernard Gorman
              Reporter:
              bernard.gorman Bernard Gorman
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: