-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Replication
-
None
-
Fully Compatible
-
v4.0, v3.6, v3.4
-
Repl 2019-05-20
Currently, we are accessing _canAcceptNonLocalWrites in an unsafe manner by NOT taking any RSTL lock. This can lead to torn read/ undefined behavior if concurrently a step up/step down thread is modifying the value.
- service_entry_point_common.cpp - execCommandDatabase
- line 667.
- line 691.
- Command_can_run_here.cpp - commandCanRunHere. And, below are the callers.
- Explain cmd.
- execCommandDatabase.
And, they all are best effort checks. So, it's ok to just make reading _canAcceptNonLocalWrites thread safe.
- is related to
-
SERVER-40700 Deadlock between read prepare conflicts and state transitions
- Closed