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

Allow $out to different database

    XMLWordPrintable

Details

    Description

      4.2 added the $merge stage which does support outputting to a different database. It's a little trickier to add support for $out to output to a different database. In a sharded environment the target collection could live on a different shard.

      Original Description

      In SERVER-13201, we discovered that a $out to a different database with mode "replaceCollection" will not work properly in a sharded cluster when the primary shard of the source database differs from the primary shard of the output database. If they are different, DocumentSourceOutReplaceCollection will perform the rename operation on the primary shard of the source, rather than the primary shard of the output.

      We will prohibit $out with mode "replaceCollection" to a foreign database in SERVER-13201. This ticket will then track the work to get the metadata operations working properly in a sharded cluster.

      Attachments

        Issue Links

          Activity

            People

              backlog-server-query Backlog - Query Team (Inactive)
              kyle.suarez@mongodb.com Kyle Suarez
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: