Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-26013

Add means to the DistLockManager to restore locks during draining mode

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.3.14
    • Affects Version/s: None
    • Component/s: Sharding
    • Labels:
      None
    • Fully Compatible
    • Sharding 2016-09-19

      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.

            Assignee:
            kaloian.manassiev@mongodb.com Kaloian Manassiev
            Reporter:
            kaloian.manassiev@mongodb.com Kaloian Manassiev
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: