[SERVER-36259] Allow aggregations with $out to be run in a transaction when the "mode" does not perform DDL operations Created: 24/Jul/18 Updated: 06/Dec/22 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | Aggregation Framework |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Kyle Suarez | Assignee: | Backlog - Query Optimization |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | 4.2-agg-txn | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Query Optimization
|
||||||||
| Participants: | |||||||||
| Description |
|
With This ticket will track work to simply remove the prohibition of $out in a transaction as long as the "mode" is compatible. We'll also write tests that exercise this behavior as appropriate. (Currently, we plan to use the DBDirectClient and the ClusterWriter to perform writes inside of $out. We will have to investigate whether this will work in a transaction. One concern is the risk of a deadlock on checking out the session or stashed transaction resources, especially with the DBDirectClient. We may have to either unstash resources or refactor the code in a way that does not depend on the DBDirectClient.) |
| Comments |
| Comment by Kyle Suarez [ 23/Aug/18 ] | ||||||||||||||||
|
I'm removing this from the $out project and placing it on the backlog for now. We'll revisit this again in 4.2 at our next planning meeting and consider transaction support for $out together with $lookup. | ||||||||||||||||
| Comment by Kyle Suarez [ 21/Aug/18 ] | ||||||||||||||||
|
Yep, you're correct. It may "just work" out of the box, though, as there is already existing code in write_ops_exec that will fail writes that attempt to implicitly create a collection:
| ||||||||||||||||
| Comment by Nicholas Zolnierz [ 21/Aug/18 ] | ||||||||||||||||
|
kyle.suarez Is implicit collection creation considered a DDL operation? If so we may want to disallow it as part of this ticket? | ||||||||||||||||