-
Type:
Improvement
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Catalog and Routing
-
Fully Compatible
-
200
Some implementations of assertNoMovePrimaryInProgress take a DSS lock and then a CSS lock. This is prone to deadlocks because there are other places where we take the CSS lock and then the DSS lock, mainly due to the ShardingWriteRouter and opObservers.
We don't need to hold both locks at the same time, since the stability for whether there's an in progress movePrimary or not is given by the DB lock, not the DSS lock.