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

Array as shard key value should be prohibited.

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.9.2
    • Affects Version/s: 1.9.1
    • Component/s: Sharding
    • None
    • ALL

      Suppose you have a sharded cluster with a shard key, n. Suppose further that shard 1 holds the range 1-100 and shard 2 has the range 100-infinity.

      It's now possible to insert:

      db.col.insert(

      {n: [1, 2]}

      )

      But the query:

      db.col.find(

      {n: 1}

      )

      Will not return the just-inserted document.

      The original insert of the array should fail.

            Assignee:
            greg_10gen Greg Studer
            Reporter:
            kbanker Kyle Banker
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: