[SERVER-37378] Prevent $out to the same namespace as the aggregation for the new modes Created: 28/Sep/18  Updated: 29/Oct/23  Resolved: 08/Nov/18

Status: Closed
Project: Core Server
Component/s: Aggregation Framework
Affects Version/s: None
Fix Version/s: 4.1.5

Type: Task Priority: Major - P3
Reporter: Nicholas Zolnierz Assignee: Devin Hilly (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-42137 Allow aggregation $merge stage to wri... Closed
Backwards Compatibility: Fully Compatible
Sprint: Query 2018-11-05, Query 2018-11-19
Participants:

 Description   

To avoid a "Halloween Problem" scenario, we will prevent writing to a collection with $out while simultaneously reading from that collection as the source aggregation collection. An exception will be made when the mode is "replaceCollection", because the use of a temporary namespace prevents an infinite loop of reads and writes.



 Comments   
Comment by Githook User [ 08/Nov/18 ]

Author:

{'name': 'Devin Hilly', 'email': 'devin.hilly@mongodb.com', 'username': 'dmhilly'}

Message: SERVER-37378 Prevent $out to the same namespace as the aggregation for the new modes
Branch: master
https://github.com/mongodb/mongo/commit/95bfbe8166aa4dd7f45c9869b66cb14f9deabc9f

Generated at Thu Feb 08 04:45:49 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.