[SERVER-66331] Additional $searchMeta test coverage Created: 10/May/22 Updated: 29/Oct/23 Resolved: 15/Sep/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Distributed Query Execution, Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 6.0.2 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Evan Plotkin | Assignee: | Charlie Swanson |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Issue Links: |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Operating System: | ALL | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Backport Requested: |
v6.0
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Steps To Reproduce: | These can be repro'd locally with mongodb 6.0.0-rc4 Sharded Collection With Docs On One Shard1) Connect to mongos 2) Setup Collection
3) Define Index on the collection with the given mappings on "myDb.myCol"
4) See that this aggregation works, using $search and $project{}
5) See that this aggregation fails with the error: Must own one of the two arguments if there are documents in the batch{}
Unsharded Collection1) Connect to mongos 2) Setup Collection
3) Define Index on the collection with the given mappings on "myDb.myColUnsharded"
4) See that this aggregation works, using $search and $project{}
5) See that this aggregation fails and the mongod crashes.{}
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Sprint: | QO 2022-05-16, QO 2022-05-30, QO 2022-06-13, QO 2022-06-27, QO 2022-07-11, QO 2022-07-25, QO 2022-08-08 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Participants: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
When testing with 6.0.0-rc4 in cloud-dev, I ran into a few issues with $searchMeta when run against an unsharded collection & against a sharded collection with all of its docs on a single shard. When I run a $searchMeta query against a sharded collection, where docs are only present on a single shard, I receive this error:
When I run a $searchMeta query against a totally unsharded collection, the mongod running the query crashes. I have attached this log of the mongod that crashed: unsharded_logs.txt
In both scenarios, when I use a normal $search query with $project to access $$SEARCH_META, it works correctly. I've also attached local repros. Cloud-dev is seeing issues with the mongotHost parameter so can't repro there yet. |
| Comments |
| Comment by Githook User [ 15/Sep/22 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
Author: {'name': 'Charlie Swanson', 'email': 'charlie.swanson@mongodb.com', 'username': 'cswanson310'}Message: | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Charlie Swanson [ 15/Sep/22 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
Re-opening to commit on the 6.0 branch as described in the linked BACKPORT. | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Steve Tarzia [ 16/May/22 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
There is additional search test coverage in the works in | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Evan Plotkin [ 10/May/22 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
The mongotHost issue has been fixed and this can now be repro'd against cloud-dev. (To repro in your own cluster, follow the repro steps, using the UI search index creator to create your search indexes with the given mappings) evan.basicString (Sharded collection with zone ranges splitting docs across each shard. $$SEARCH_META and $searchMeta both work) evan.basicStringUnshared (Unsharded collection. $$SEARCH_META works. $searchMeta crashes the mongod) evan.basicStringNoZones (Unsharded collection. $$SEARCH_META works. $searchMeta gives this error: `Must own one of the two arguments if there are documents in the batch`) The queries I am running on these are: $$SEARCH_META
$searchMeta
|