-
Type: Task
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Replication
-
Labels:None
-
Replication
Stepdown kills all the running operations, sets the _canAcceptNonLocalWrites to false under the global lock, and waits for nodes to catch up without holding the global lock. When stepdown is signaled to check its stepdown condition, it re-acquires the global X lock and releases it afterwards.
In 4.0 we don't allow starting a transaction if we can't accept writes, thanks to SERVER-34557, so read transactions during primary stepdown are not allowed so they won't block the stepdown which needs the exclusive global lock. If we start allowing transactions on secondaries then we need to make sure the read transactions don't block stepdown's global lock request during the waiting.