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.
- Command_can_run_here.cpp - commandCanRunHere. And, below are the callers.
- Explain cmd.
And, they all are best effort checks. So, it's ok to just make reading _canAcceptNonLocalWrites thread safe.