[SERVER-65534] $documents doesn't work if a later stage needs to run on a shard (not mongos) Created: 13/Apr/22 Updated: 02/Feb/24 Resolved: 21/Sep/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.2.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Charlie Swanson | Assignee: | Chi-I Huang |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Assigned Teams: |
Query Optimization
|
||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||
| Backport Requested: |
v6.1, v6.0
|
||||||||||||||||||||||||
| Steps To Reproduce: | Try to run something like the following on a mongos:
|
||||||||||||||||||||||||
| Sprint: | QO 2023-09-04, QO 2023-09-18, QO 2023-10-02 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Description |
|
This limits the applicability, and is preventing another internal use case for $documents from working. |
| Comments |
| Comment by Githook User [ 28/Nov/23 ] |
|
Author: {'name': 'rakiz', 'email': 'sebastien.mendez@mongodb.com', 'username': 'rakiz'}Message: Since In this fix we replace the invariant with a 'uassert', which was already |
| Comment by Githook User [ 21/Sep/23 ] |
|
Author: {'name': 'Chi-I Huang', 'email': 'chii.huang@mongodb.com', 'username': 'chiihuang'}Message: Running db.aggregate([{$documents: [{}]}, {$out: "test"}]) on mongos will fail because the host requirement of $queue kLocalOnly is translated to kMongoS, which conflicts with the requirement of $out which needs kPrimaryShard. In other words, kLocalOnly and kPrimaryShard cannot coexist in the same pipeline. To avoid the conflict, this PR introduces a new requirement HostTypeRequirement::kRunOnceAnyNode which works well with kPrimaryShard. |
| Comment by Ana Meza [ 22/Apr/22 ] |
|
Passing to Product for guidance on priority |