[SERVER-45972] Test that $out can write to the same collection it is reading from Created: 04/Feb/20 Updated: 29/Oct/23 Resolved: 06/Mar/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Aggregation Framework |
| Affects Version/s: | None |
| Fix Version/s: | 4.4.0-rc0, 4.7.0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | David Storch | Assignee: | David Storch |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Backport Requested: |
v4.4
|
||||||||||||
| Sprint: | Query 2020-03-23 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
This test coverage is apparently missing. By adding this coverage in the jstests/aggregation/ directory, we also get the benefit of it running in various passthrough suites. In particular, this will run in the new aggregation_secondary_reads passthrough suite which was recently added under |
| Comments |
| Comment by Githook User [ 19/Mar/20 ] |
|
Author: {'name': 'David Storch', 'username': 'dstorch', 'email': 'david.storch@mongodb.com'}Message: (cherry picked from commit a0ea828db65d96d8c49ca998b9a9aa4c5f1671e7) |
| Comment by Githook User [ 06/Mar/20 ] |
|
Author: {'name': 'David Storch', 'username': 'dstorch', 'email': 'david.storch@mongodb.com'}Message: |
| Comment by David Storch [ 05/Mar/20 ] |
|
mihai.andrei yeah, I also couldn't find a test in jstests/aggregation/ proving that the source and target collections for $out can be the same. Let's repurpose this ticket to be about adding basic test coverage for this. |
| Comment by Mihai Andrei [ 03/Mar/20 ] |
|
It looks we have coverage for this through https://github.com/mongodb/mongo/blob/master/jstests/aggregation/sources/merge/merge_to_referenced_collection.js for $merge, but we might need to write a test for $out. The closest thing I could find to coverage was this test, but this test verifies that $out can't write to a system collection. |
| Comment by David Storch [ 02/Mar/20 ] |
|
ian.boros I'm returning this to the backlog. We hope to get test coverage of this with a new aggregation_secondary_reads passthrough in |