Coverity analysis defect 184172: Value not atomically updated

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Catalog and Routing
    • ALL
    • CAR Team 2026-02-02
    • 1
    • 🟥 DDL
    • 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
      /src/mongo/db/global_catalog/ddl/refine_collection_shard_key_coordinator.cpp:253: ATOMICITY 184172 Locking "opCtx->_client".
      /src/mongo/db/global_catalog/ddl/refine_collection_shard_key_coordinator.cpp:258: ATOMICITY 184172 Assigning data that might be protected by the lock to "ns".
      /src/mongo/db/global_catalog/ddl/refine_collection_shard_key_coordinator.cpp:269: ATOMICITY 184172 Unlocking "this->this->_docMutex". "ns" might now be unreliable because other threads can now change the data that it depends on.
      /src/mongo/db/global_catalog/ddl/refine_collection_shard_key_coordinator.cpp:269: ATOMICITY 184172 Locking "opCtx->_client" again.
      /src/mongo/db/global_catalog/ddl/refine_collection_shard_key_coordinator.cpp:270: ATOMICITY 184172 Using an unreliable value of "ns" inside the second locked section. If the data that "ns" depends on was changed by another thread, this use might be incorrect.

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

              Created:
              Updated: