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

Make all distLock acquisitions local-only

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Fully Compatible

      The goal of this ticket is to convert DistLocks to simpler local-only in-memory locks.

      • Remove all API related to distributed locking from the DistLockManager.
      • Remove ReplicaSetDistLockManager.
      • Remove DistLockCatalog.
      • Delete TypeLocks and TypeLockpings basic type.
      • Drop config.lockpings and config.lock collections when upgrading to FCV version > 6.0.
      • Fix all the affected js/unit tests.

      Rationale

      DistLocks were used to serialized DDL operations in sharded cluster, in PM-1965 we made that all DDL operations are coordianted by the database primary shard. This means that we don't really need anymore the distributed guarantee of the distlocks since we can simply serialize all the DDL operations for a specific database on a single node.

      There was another reson that prevented us to deprecate the distlocks until now. In the past the distlocks were used also to serialize DDL operations with chunk migrations. As of today all DDL operations that needs guarantees around data placement stability use another serialization mechanism based on setting/unsetting allowMigration flag in config.collections that became fully effective after SERVER-61759.

      This means that starting from 6.0 the distributed guarantees of the distlocks are not required anymore and that all the associated code can be removed.

            Assignee:
            tommaso.tocci@mongodb.com Tommaso Tocci
            Reporter:
            tommaso.tocci@mongodb.com Tommaso Tocci
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: