Unprotected concurrent access to coordinator doc member variable by DDL coordinator implementations

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Duplicate
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Sharding EMEA
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      Current implementations of some DDL coordinators access the _doc member variable inside checkIfOptionsConflict and reportCurrentOp without any concurrency control even though it can be modified when _runImpl is being executed.

      For example, in RefineCollectionShardKeyCoordinator coordinator doc is read here:
      https://github.com/10gen/mongo/blob/b4384a6a6774ae494e57adc0c625769fec107828/src/mongo/db/s/refine_collection_shard_key_coordinator.cpp#L71
      https://github.com/10gen/mongo/blob/b4384a6a6774ae494e57adc0c625769fec107828/src/mongo/db/s/refine_collection_shard_key_coordinator.cpp#L82

      And modified here:
      https://github.com/10gen/mongo/blob/b4384a6a6774ae494e57adc0c625769fec107828/src/mongo/db/s/refine_collection_shard_key_coordinator.cpp#L114

            Assignee:
            [DO NOT USE] Backlog - Sharding EMEA
            Reporter:
            Randolph Tan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: