renameCollection now locks source and target namespaces sequentially based on their resourceIds order. But we should make an exception for "db.system.views" collection because any operation that triggers a view catalog reload will lock "db.system.views" in IS mode in the end.
For example, if an operation locks A first and then "db.system.views", and a concurrent renameCollection locks "db.system.views" first and then A, there could be a deadlock.
Therefore, renameCollection should always lock system.views in the end.
- is related to
-
SERVER-41643 Create/drop view should lock system.views collection after view namespace
- Closed