Currently, the sharding balancer first selects chunks which should be moved around and then passes them to the _moveChunks routine to do the actual move. This routine does not expect any of these chunks' databases to disappear during the round, but there is nothing to prevent this (and there is no need to).
We should make the balancer _moveChunks routine skip databases and collections, which do not exist and there should be a secondary check, which checks the collection's epoch to ensure that if a collection is dropped and recreated, we will discard any further moves for that collection from this round.
- is related to
-
SERVER-24853 Refactor Balancer code to use MigrationManager in order to move chunks in parallel
- Closed