[SERVER-38971] Single shard query hits multiple shard if it includes end of chunk range Created: 13/Jan/19 Updated: 15/Nov/21 Resolved: 14/Jan/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 4.0.5 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | James Hartig | Assignee: | Danny Hatcher (Inactive) |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Operating System: | ALL | ||||||||
| Steps To Reproduce: |
But if you instead remove one character from the u field: db.sessions4.find({r: "gce-us-east1", u: {$lt: "UxOVavlFZXtKRL5MnB+1uQ="}}).limit(2).explain() It will show that it only needs to query 1 shard |
||||||||
| Participants: | |||||||||
| Description |
|
I have a sharded collection on r,u and the following chunks:
If I do a query that involves {u: "UxOVavlFZXtKRL5MnB+1uQ=="} then it will hit both shards even though it only needs to hit sessions_gce_us_east1_2. |
| Comments |
| Comment by Danny Hatcher (Inactive) [ 14/Jan/19 ] |
|
Hello James, Thank you for your report. You have encountered SERVER-20768. Any work that would resolve this scenario will be performed on that ticket so I will close this ticket as a duplicate. Thank you, Danny |
| Comment by James Hartig [ 13/Jan/19 ] |
|
I attached verbose logging from mongos when I run the query. The relevant connection is "conn118" |