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

XMLWordPrintableJSON

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

      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:
              [DO NOT USE] Backlog - Cluster Scalability
              Reporter:
              Spencer Brody (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

                Created:
                Updated: