[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:
Depends
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.

Generated at Thu Feb 08 03:01:34 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.