[SERVER-6811] prefix shard keys index bounds handling Created: 21/Aug/12 Updated: 11/Jul/16 Resolved: 22/Aug/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 2.2.0-rc1 |
| Fix Version/s: | 2.2.0-rc2, 2.3.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Greg Studer | Assignee: | Kevin Matulef |
| Resolution: | Done | 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 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
If we shard over { x : 1 }with index { x : 1, y : 1 }, and have chunks A: {x:2}-> {x:3}and B: {x:3}-> {x:4}, a document D : { x : 3, y : "abcde" }is currently included in migrations and other operations for both A and B. This is b/c when we get index key bounds from the prefix, we complete them with MinKey for min and MaxKey for max, so the index max bound of A is {x:3,y:MaxKey}and the index min bound of B is {x:3,y:MinKey}, and both ranges overlap D. Included test shows how this results in extra documents removed during migration. Proposed solution - complete with just MinKey? The problem is harder to trigger with our standard tests with _id indexes, not sure why. |
| Comments |
| Comment by auto [ 04/Sep/12 ] |
|
Author: {u'date': u'2012-08-21T14:19:11-07:00', u'email': u'matulef@10gen.com', u'name': u'Kevin Matulef'}Message: |
| Comment by auto [ 21/Aug/12 ] |
|
Author: {u'date': u'2012-08-20T19:01:39-07:00', u'email': u'matulef@10gen.com', u'name': u'Kevin Matulef'}Message: |
| Comment by auto [ 21/Aug/12 ] |
|
Author: {u'date': u'2012-08-20T19:01:39-07:00', u'email': u'matulef@10gen.com', u'name': u'Kevin Matulef'}Message: |
| Comment by Greg Studer [ 21/Aug/12 ] |
|
Interactions with MaxKey are a bit wonky here - in theory, though almost no one will come across a case where it will matter, we'd want the final chunk to always be MaxKeys. Otherwise you could miss docs like { x : MaxKey, y : "abcde" }. |