[SERVER-4791] shard selection code ignores bound inclusivity Created: 27/Jan/12 Updated: 07/Dec/15 Resolved: 07/Dec/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Aaron Staple | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
The [min, max) comment is incorrect here, both min and max are treated as inclusive bounds. That means for a query like {a:{$lt:5}} a chunk [ {a:5}, {a:6}) will be considered to potentially contain matches even though it cannot contain matches. Similarly, it looks like the datasize command calls this function with the expectation that max is treated as an exclusive bound, even though it is not. There's no functional error here, just a possibility of sending the operation to a shard unnecessarily. And also, currently there are cases where an inclusive upper bound must be supported - so to optimize we'd need to support both inclusive and exclusive bounds. Descriptive test written, push pending bb code freeze. |
| Comments |
| Comment by David Storch [ 07/Dec/15 ] |
|
Closing as a duplicate of SERVER-20768. |
| Comment by auto [ 22/Mar/12 ] |
|
Author: {u'login': u'astaple', u'name': u'Aaron', u'email': u'aaron@10gen.com'}Message: |
| Comment by auto [ 07/Feb/12 ] |
|
Author: {u'login': u'astaple', u'name': u'Aaron', u'email': u'aaron@10gen.com'}Message: |