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

suboptimal read isolation when using $in with shard keys

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Duplicate
    • 4.0.2
    • None
    • Sharding
    • None

    Description

      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.

      Attachments

        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

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: