Make ReadWriteAbility::_canAcceptNonLocalWrites AtomicWord<bool> to prevent torn reads.

XMLWordPrintableJSON

    • Fully Compatible
    • v4.0, v3.6, v3.4
    • Repl 2019-05-20
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

      And, they all are best effort checks. So, it's ok to just make reading _canAcceptNonLocalWrites thread safe.

              Assignee:
              Vesselina Ratcheva (Inactive)
              Reporter:
              Suganthi Mani
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: