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

Make CurOp::_numYields atomic

    • Fully Compatible
    • ALL
    • Query 2020-08-24
    • 50

      The '_numYields' field gets updated in a single thread, but other threads can read it via $currentOp. These reads can trigger appear as data races in TSAN and are technically undefined behavior. Making '_numYields' atomic silences the TSAN errors and gives us reasonable behavior for the purposes of $currentOp.

            Assignee:
            justin.seyster@mongodb.com Justin Seyster
            Reporter:
            justin.seyster@mongodb.com Justin Seyster
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: