[SERVER-63811] mongos returns no results for $documents if the database doesn't exist Created: 17/Feb/22 Updated: 29/Oct/23 Resolved: 22/Sep/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.1.1, 6.0.3, 6.2.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Charlie Swanson | Assignee: | Gil Alon |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||
| Backwards Compatibility: | Minor Change | ||||||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||||||
| Backport Requested: |
v6.1, v6.0
|
||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||
| Description |
|
A mongos will return an empty result set on any pipeline with a $documents stage like this one:
I believe this is due to this logic:
This is a behavioral difference from a replica set, and can make writing tests annoying (discovered in The new, requested behavior is to allow the operation to continue even if the db doesn't exist for $documents. Similar to how $changeStreams is handled, it may be the case that special support/case handling will have to be added to support $documents if current agg implementation isn't prepared to handle the db not existing. |
| Comments |
| Comment by Githook User [ 02/Jun/23 ] |
|
Author: {'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}Message: fix(shell-api): try running convertShardKeyToHashed agg against empty db (#1479) Recently, our serverless connectivity tests have been failing in CI because However, our serverless test instance is now running MongoDB 6.3.1, |
| Comment by Githook User [ 01/Jun/23 ] |
|
Author: {'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}Message: fix(shell-api): try running convertShardKeyToHashed agg against empty db (#1479) Recently, our serverless connectivity tests have been failing in CI because However, our serverless test instance is now running MongoDB 6.3.1, |
| Comment by Githook User [ 01/Jun/23 ] |
|
Author: {'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}Message: fix(shell-api): try running convertShardKeyToHashed agg against empty db Recently, our serverless connectivity tests have been failing in CI because However, our serverless test instance is now running MongoDB 6.3.1, |
| Comment by Githook User [ 14/Oct/22 ] |
|
Author: {'name': 'galon1', 'email': 'gil.alon@mongodb.com', 'username': 'galon1'}Message: |
| Comment by Githook User [ 10/Oct/22 ] |
|
Author: {'name': 'galon1', 'email': 'gil.alon@mongodb.com', 'username': 'galon1'}Message: |
| Comment by Githook User [ 20/Sep/22 ] |
|
Author: {'name': 'galon1', 'email': 'gil.alon@mongodb.com', 'username': 'galon1'}Message: |