When a balance round starts, we find every collection that needs balancing and choose one chunk for each collection to move. The balancer then moves all those chunks (one at a time) as a part of the same balance round.
Before every balance round we check to make sure the balancer is disabled and don't kick off a migration if it is. Within one balance round, however, we don't ever check if the balancer has been disabled, and since one balance round can include moving multiple chunks, so long as those chunks are from different collections, that means that even if the balancer gets disabled, new chunk moves can continue to be initiated if the current balance round is still in progress.
We should add a check between each migration in the balance round to see if the balancer has been disabled since the balancing round began.
- duplicates
-
SERVER-5004 balancer should check for stopped between chunk moves in current round
- Closed