Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-30970

Don't allow single-updates that aren't targetted on the shard key

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Sharding
    • Cluster Scalability

      Single document updates usually need to specify an exact match on the shard key to be allowed, so that mongos knows it can send it to a single shard and be guaranteed to only update a single document. If, however, your shard key doesn't include _id, we allow you to do a single update that matches on _id but not the shard key. This will result in sending the write to all shards, with the expectation that only one shard will contain a document with that _id. Since we don't enforce uniqueness of _id in a sharded cluster that's not sharded on _id, however, that assumption is incorrect and a single update could in fact wind up updating multiple unrelated documents.

            Assignee:
            backlog-server-cluster-scalability [DO NOT USE] Backlog - Cluster Scalability
            Reporter:
            spencer@mongodb.com Spencer Brody (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated: