[SERVER-12472] Fail MoveChunk if an index is needed on TO shard and data exists Created: 24/Jan/14 Updated: 27/Oct/15 Resolved: 15/Aug/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Index Maintenance, Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 2.6.6, 2.7.6 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Scott Hernandez (Inactive) | Assignee: | Randolph Tan |
| Resolution: | Done | Votes: | 6 |
| Labels: | moveChunk | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Minor Change | ||||||||||||||||
| Backport Completed: | |||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
During a moveChunk we ensure all indexes from the source shard. This makes sense if the collection is new or already has all the indexes (since it is a no-op) but in the case of different indexes a movechunk can degrade performance and block other operations because of the "new" indexes. It is therefore an improvement to make the operation fail because of the missing index(es) rather than add load and affect performance and availability of the destination shard. See https://github.com/mongodb/mongo/blob/v2.4/src/mongo/s/d_migrate.cpp#L1660 for the 2.4.x (currently the same in 2.5.x) behavior. |
| Comments |
| Comment by Githook User [ 24/Nov/14 ] |
|
Author: {u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}Message: |
| Comment by Githook User [ 15/Aug/14 ] |
|
Author: {u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}Message: |
| Comment by David Hows [ 27/Jan/14 ] |
|
May be worth adding some kind of health check command in the shell (maybe |