[SERVER-14506] special top chunk logic can move max chunk to a shard with incompatible tag Created: 09/Jul/14 Updated: 12/May/15 Resolved: 08/Aug/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 2.6.6, 2.7.5 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Asya Kamsky | Assignee: | Randolph Tan |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||||||||||
| Backport Completed: | |||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||
| Description |
|
Issue Status as of Aug 08, 2014 ISSUE SUMMARY This issue does not apply to sharded clusters using hashed shard keys. USER IMPACT WORKAROUNDS AFFECTED VERSIONS FIX VERSION Original descriptionIn special logic for splitting top or bottom chunk https://github.com/mongodb/mongo/blob/master/src/mongo/s/d_split.cpp#L886 sets shouldMigrate to true. https://github.com/mongodb/mongo/blob/master/src/mongo/s/chunk.cpp#L466 goes along with the idea as long as balancing isn't disabled, and uses Shard::pick() to find the new target shard for the "hot" chunk. However, https://github.com/mongodb/mongo/blob/master/src/mongo/s/shard.cpp#L425 does not seem to take tags into account and ends up moving the chunk to a shard from which it must then immediately be moved in the next round (violating tagging in the meanwhile). This problem does not apply to hashed shard key since special logic is bypassed in that case. |
| Comments |
| Comment by Githook User [ 25/Nov/14 ] |
|
Author: {u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}Message: Fix test |
| Comment by Githook User [ 25/Nov/14 ] |
|
Author: {u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}Message: Conflicts: |
| Comment by Githook User [ 25/Nov/14 ] |
|
Author: {u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}Message: Make DistributionStatus store ChunkTypes instead of BSONObj Conflicts: |
| Comment by Githook User [ 08/Aug/14 ] |
|
Author: {u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}Message: |
| Comment by Githook User [ 08/Aug/14 ] |
|
Author: {u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}Message: Make DistributionStatus store ChunkTypes instead of BSONObj |
| Comment by Greg Studer [ 09/Jul/14 ] |
|
A workaround might be to add a split point at an extremely high, unreachable shard key value to prevent the top chunk optimization from coming into effect? |