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

Array as shard key value should be prohibited.

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 1.9.1
    • 1.9.2
    • Sharding
    • None
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: