[SERVER-2920] add atomic output collection to DBQuery Created: 08/Apr/11 Updated: 06/Dec/22 Resolved: 22/Mar/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Minor - P4 |
| Reporter: | Sam Kass | Assignee: | Backlog - Query Team (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Assigned Teams: |
Query
|
||||
| Participants: | |||||
| Description |
|
A Map/Reduce query can atomically output its results to a separate collection, which is nice for a job where you want to create "views" of the data that you can then query within. It would be nice if immediate queries could do the same thing, eg. db.mycollection.find( {hasAttachments:true}).out(attachcollection); It could operate asynchronously, and attachcollection would remain unmodified until the query was complete after which it would be atomically swapped with the temporary collection in which the new results reside. |
| Comments |
| Comment by Asya Kamsky [ 22/Mar/19 ] |
|
This has been possible with $out from aggregation pipeline since 2.6. |