Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-41036

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

    XMLWordPrintable

    Details

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              vesselina.ratcheva Vesselina Ratcheva
              Reporter:
              suganthi.mani Suganthi Mani
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: