Coverity analysis defect 171747: Value not atomically updated

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Catalog and Routing
    • ALL
    • None
    • 3
    • TBD
    • None
    • None
    • None
    • None
    • None
    • None

      Value not atomically updated

      The result of the update will be determined by the interleaving of thread execution. Non-atomic update of a concurrently shared value
      /data/mci/58e221f6910c414f2794c3d97c4fb8a1/bazel_cache/b26a070346a7e7a0a75aadbf03a9644f/execroot/_main/src/mongo/db/s/move_primary_coordinator.cpp:754: ATOMICITY 171747 Locking "opCtx->_client".
      /data/mci/58e221f6910c414f2794c3d97c4fb8a1/bazel_cache/b26a070346a7e7a0a75aadbf03a9644f/execroot/_main/src/mongo/db/s/move_primary_coordinator.cpp:753: ATOMICITY 171747 Assigning data that might be protected by the lock to "nss".
      /data/mci/58e221f6910c414f2794c3d97c4fb8a1/bazel_cache/b26a070346a7e7a0a75aadbf03a9644f/execroot/_main/src/mongo/db/s/move_primary_coordinator.cpp:754: ATOMICITY 171747 Unlocking "this->_docMutex". "nss" might now be unreliable because other threads can now change the data that it depends on.
      /data/mci/58e221f6910c414f2794c3d97c4fb8a1/bazel_cache/b26a070346a7e7a0a75aadbf03a9644f/execroot/_main/src/mongo/db/s/move_primary_coordinator.cpp:754: ATOMICITY 171747 Locking "opCtx->_client" again.
      /data/mci/58e221f6910c414f2794c3d97c4fb8a1/bazel_cache/b26a070346a7e7a0a75aadbf03a9644f/execroot/_main/src/mongo/db/s/move_primary_coordinator.cpp:755: ATOMICITY 171747 Using an unreliable value of "nss" inside the second locked section. If the data that "nss" depends on was changed by another thread, this use might be incorrect.

            Assignee:
            Unassigned
            Reporter:
            Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated: