-
Type: Task
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Replication
-
None
-
Replication
Currently, stepDown uses
ThreadWaiter and WaiterGuard always keeps the waiter in the list as long as the WaiterGuard is in scope. The function's implementation is a bit confusing at the moment. What it really needs to do is to wait for majority with at least one electable node. The implementation now keeps the majority waiter in the list even though majority is satisfied, only because it wants to use the waiter list notification as an indicator of oplog changes so it can check if the majority nodes that the write has replicated to contains at least one electable node. If no, it goes back into waiting until another node's OpTime changes then re-check again to avoid polling.
Ideally, this should wait for majority then $stepDownCheck. Or somehow combine the two rules into one.
- related to
-
SERVER-43904 When stepping down, step up doesn't filter out frozen nodes
- Closed