As part of the balancer state recovery after stepdown we need to be able to re-acquire the collection distributed locks held by the previous balancer session. This must be done while replication is still in draining mode in order to avoid a race condition where a mongos steals them before the recovery manages to run.
Since majority writes are not allowed while in draining mode, this lock re-acquisition must be done with local write concern.
This ticket is to add a method on the DistLockManager, which would allow such mode of lock acquisition.
Furthermore, because the only owner of the locks being restored can be the balancer, which cleans all its locks before recovery begins, this method does not need to do any lock overtaking.
- is depended on by
-
SERVER-25905 In transition to config primary, drop all distlocks, and reacquire balancer distlocks
- Closed