[SERVER-85517] Handle failed moveCollection commands in the MoveUnshardedPolicy Created: 22/Jan/24  Updated: 25/Jan/24

Status: Backlog
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Allison Easton Assignee: Backlog - Catalog and Routing
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Catalog and Routing
Participants:

 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.


Generated at Thu Feb 08 06:57:56 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.