[SERVER-35920] Make sure read transactions during primary stepdown don't block stepdown Created: 29/Jun/18  Updated: 06/Dec/22  Resolved: 07/Jul/20

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Siyuan Zhou Assignee: Backlog - Replication Team
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Replication
Participants:

 Description   

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.


Generated at Thu Feb 08 04:41:28 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.