[SERVER-75010] Implement no-op planShardedSearch in 5.0 Created: 17/Mar/23 Updated: 29/Oct/23 Resolved: 21/Apr/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 4.4.22, 5.0.18 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Ben Shteinfeld | Assignee: | Ben Shteinfeld |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||
| Assigned Teams: |
Query Optimization
|
||||||||||||||||||||||||||||
| Backwards Compatibility: | Minor Change | ||||||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||||||
| Backport Requested: |
v5.0, v4.4
|
||||||||||||||||||||||||||||
| Sprint: | QO 2023-04-03, QO 2023-04-17, QO 2023-05-01 | ||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||
| Description |
|
Currently planShardedSearch is only implemented in 6.0+. Thus when a sharded cluster receives a $search query with sort, it does not support merge sorting on $searchSortValues as mongos never got a sortSpec from mongot, resulting in incorrect query results (potentially not sorted results). The task of this ticket is to send a planShardedSearch request in sharded cluster in 5.0 to mongot, indicating to mongot that mongos does not support sort. Mongot will respond with an error if the query contains a sort, causing mongos to error out. This will solve the problem described above by returning an error rather than silently returning incorrect results. |
| Comments |
| Comment by Githook User [ 25/Apr/23 ] |
|
Author: {'name': 'Ben Shteinfeld', 'email': 'ben.shteinfeld@mongodb.com', 'username': 'bshteinfeld'}Message: This is a partial backport of (cherry picked from commit 190f4f7f5def5af8ae8d992ddabaea06e216f743) |
| Comment by Githook User [ 07/Apr/23 ] |
|
Author: {'name': 'Ben Shteinfeld', 'email': 'ben.shteinfeld@mongodb.com', 'username': 'bshteinfeld'}Message: This is a partial backport of |