[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:
Related
related to SERVER-16316 Remove unsupported behavior in shard3.js Closed
is related to DOCS-4316 Warn re: moveChunk failure if documen... Closed
Tested
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: SERVER-12472 Fail MoveChunk if an index is needed on TO shard and data exists
Branch: v2.6
https://github.com/mongodb/mongo/commit/0f7dbe98cd6a4f15eb7a112fbae62383fb3805c6

Comment by Githook User [ 15/Aug/14 ]

Author:

{u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}

Message: SERVER-12472 Fail MoveChunk if an index is needed on TO shard and data exists
Branch: master
https://github.com/mongodb/mongo/commit/39d5795eab4da921e2c813b3c99ae52a0d913f6b

Comment by David Hows [ 27/Jan/14 ]

May be worth adding some kind of health check command in the shell (maybe SERVER-8752) so that admins can be aware that migrations have failed due to missing indexes and know what those indexes are.

Generated at Thu Feb 08 03:28:37 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.