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

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

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

      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:
            backlog-query-optimization [DO NOT USE] Backlog - Query Optimization
            Reporter:
            tess.avitabile@mongodb.com Tess Avitabile (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: