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

Array as shard key value should be prohibited.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 1.9.1
    • Fix Version/s: 1.9.2
    • Component/s: Sharding
    • Labels:
      None
    • Operating System:
      ALL

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: