Make CurOp::_numYields atomic

XMLWordPrintableJSON

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

      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
              Reporter:
              Justin Seyster
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: