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

In transition to config primary, drop all distlocks, and reacquire balancer distlocks

    • 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, Sharding 2016-10-10

      In drain mode, drop all config locks:

      // Free any leftover locks from previous instantiations
      auto distLockManager = Grid::get(txn)->catalogClient(txn)->getDistLockManager();
      distLockManager->unlockAll(txn, distLockManager->getProcessID());
      

      and reacquire distlocks for all the the collections that have migration documents in config.migrations. Lock the distlocks with clusterId so that the balancer code can overtake the locks (because it uses clusterId as a lock session ID).

      ----------------

      This is to cover the case – which 'technically' should never happen – where the config.migrations collection doesn't match with all the config.locks docs held by the balancer when a new primary is elected.

            Assignee:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Reporter:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: