-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Replication
-
Fully Compatible
-
v4.0, v3.6
-
Repl 2018-12-17
-
18
Currently when a primary hears of a new term, it schedules work to take the global X lock and step down. Actually preventing new writes from being accepted requires changing the value of ReplicationCoordinatorImpl::_canAcceptNonLocalWrites, which requires the global X lock, so there's no way to stop accepting new writes any faster than we do currently. Filling out the response to an isMaster command, however, only requires the repl coord mutex, so we could be reporting ismaster:false as soon as we hear about a new term since at that point we know that we definitely are going to step down. This could stop new writes from being routed to us that are doomed to fail once the stepdown completes.
- related to
-
SERVER-38659 Race condition in IsMasterIsFalseDuringStepdown unittest
- Closed
-
SERVER-39473 Should not report isMaster while stepping down conditionally
- Closed