|
We've made many improvements to the $out aggregation stage in the 4.1 development release. Two important pieces of infrastructure have been completed:
SERVER-35895: $out can write to remote hosts
SERVER-12280: $out can merge its output with an existing collection, rather than replacing it outright
With these in place, users can now use the $out stage to output to an existing sharded collection. This is supported with new $out modes, "insertDocuments" and "replaceDocuments", which will use inserts and replacement-style updates, respectively, to perform writes to the output collection without dropping it.
We won't permit a $out to a sharded output collection if the mode is "replaceCollection", which matches the original $out behavior in MongoDB 4.0 and earlier.
Users can try out sharded $out aggregations by checking out a development release, though the feature is still under active development. We'll release documentation with more thorough details when the feature work is complete.
Regards,
Kyle
|