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

suboptimal read isolation when using $in with shard keys

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 4.0.2
    • Component/s: Sharding
    • Labels:
      None

      Say I have a collection with a hashed shard key on field "S".

      If I send a query such as: db.coll.find({"S": {$in: [...]}}) with[...] being a relative lengthy list (couple of hundred entries). It seems like all entries in there are send to all shards instead of mongos splitting the query appropriately. As a result, each shard has to check for each of the values.

        1. both.log
          7 kB
        2. fill_data.py
          0.3 kB
        3. just_rs1.log
          4 kB
        4. just_rs2.log
          4 kB
        5. setup.log
          2 kB
        6. shard_distribution.log
          0.6 kB

            Assignee:
            nick.brewer Nick Brewer
            Reporter:
            rmsmith Richard Smith
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: