Sharded writes should extract shard key when it is in every branch of an $or

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Write Ops
    • None
    • Query Optimization
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      Single updates, upserts, and single deletes are required to target a single shard or have an exact match on the _id. For (non-replacement-style) updates and deletes, the ChunkManagerTargeter checks that the query contains an exact match on the _id using the collection-default collation, or an exact match on the shard key using the simple collation. This is done using extractShardKeyFromQuery. However, we fail to extract the shard key / _id when there is an exact match in every branch of an $or. Then we are unable to perform the write. We should be able to extract the shard key / _id when there is an exact match in every branch of an $or.

            Assignee:
            [DO NOT USE] Backlog - Query Optimization
            Reporter:
            Tess Avitabile (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: