-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Internal Code
-
Fully Compatible
-
ALL
-
v5.2, v5.0
-
-
Sharding 2022-01-24, Sharding 2022-02-07
-
35
-
2
Since PrimaryOnlyService does not adhere to the contract of notifying the users of the condition variable whenever the underlying _state variable changes, its possible for its users such as lookUpInstance to end up waiting forever on the condition or interrupt
For instance on step down, the function updates the _state to kPaused but does not notify the condition variable
Adding a _rebuildCV.notify_all() after every update to _state should fix this issue.
- is related to
-
SERVER-51650 Primary-Only Service's _rebuildCV should be notified even if stepdown happens quickly after stepup
- Closed
- related to
-
SERVER-62884 Simplify synchronization semantics of `PrimaryOnlyService`
- Open