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.
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
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.