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

Make all distLock acquisitions local-only

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 6.1.0-rc0
    • None
    • Fully Compatible

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: