Details
-
Task
-
Resolution: Unresolved
-
Major - P3
-
None
-
None
-
None
-
None
-
Catalog and Routing
Description
If a moveCollection command issued by the balancer fails for some reason, we will add a field to the config.shards entry called `lastFailedMoveCollection` which will be a timestamp of when this migration failed.
This flag should then be taken into account by the balancer so that no new migrations are issued for this collection until 24 hours have passed since the last failure.
This handling should also be slightly different if the migration was done for draining and the error returned was that the collection could not be moved because it has a view. In this case, we should find the dbPrimary for that collection and store this information for the next balancer round so that the collection can be drained to the appropriate shard.