[SERVER-30976] Conditional Update/Insert Operation, Batched to a Find/Find-and-Modify Op Created: 06/Sep/17 Updated: 15/Nov/21 Resolved: 23/Nov/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Victor Stewart | Assignee: | Asya Kamsky |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
Very often I find myself having to run a find (or find and modify) operation on one collection, check the result, and then conditionally push an update or insert to a different collection. Constantly requiring two round trips to the database. It would be incredible if you could batch these together. Execute a find or find-and-modify operation, then depending on a field or fields gathered, execute a secondary operation on a different (or the same) collection. Maybe even feed the find result into the secondary operation (but that would be asking a lot, haha). |
| Comments |
| Comment by Asya Kamsky [ 23/Nov/17 ] |
|
It sounds like what you need to be able to do what you described are multi-document/multi-statement transactions. I've resolved this ticket as a duplicate of |
| Comment by Mark Agarunov [ 15/Sep/17 ] |
|
Hello victorstewart, On further examination, this request appears to be similar to, but not a duplicate of Thanks, |
| Comment by Asya Kamsky [ 09/Sep/17 ] |
|
I don't think this is related to |
| Comment by Mark Agarunov [ 07/Sep/17 ] |
|
Hello victorstewart, Thank you for the report. Looking over the behavior you've described, this appears to be a similar request to Thanks, |