Coverity analysis defect 173499: Value not atomically updated

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Works as Designed
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Catalog and Routing
    • ALL
    • CAR Team 2025-05-12
    • 2
    • None
    • 3
    • 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/bazel_cache/1de52aaeb35278243ca29a4785ce7969/execroot/_main/src/mongo/db/s/drop_database_coordinator.cpp:364: ATOMICITY 173499 Locking "opCtx->_client".
      /data/bazel_cache/1de52aaeb35278243ca29a4785ce7969/execroot/_main/src/mongo/db/s/drop_database_coordinator.cpp:401: ATOMICITY 173499 Assigning data that might be protected by the lock to "coll".
      /data/bazel_cache/1de52aaeb35278243ca29a4785ce7969/execroot/_main/src/mongo/db/s/drop_database_coordinator.cpp:405: ATOMICITY 173499 Unlocking "this->this->_docMutex". "coll" might now be unreliable because other threads can now change the data that it depends on.
      /data/bazel_cache/1de52aaeb35278243ca29a4785ce7969/execroot/_main/src/mongo/db/s/drop_database_coordinator.cpp:405: ATOMICITY 173499 Locking "opCtx->_client" again.
      /data/bazel_cache/1de52aaeb35278243ca29a4785ce7969/execroot/_main/src/mongo/db/s/drop_database_coordinator.cpp:409: ATOMICITY 173499 Using an unreliable value of "coll" inside the second locked section. If the data that "coll" depends on was changed by another thread, this use might be incorrect.

            Assignee:
            Tommaso Tocci
            Reporter:
            Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: