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

Improve error message when trying to shard on non-existent field

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.1.0
    • Affects Version/s: 1.8.2
    • Component/s: Sharding
    • None

      If any of the shard keys don't exist, the error message is fairly opaque. Could it mention the document _id.

      > db.runCommand( { shardcollection : "" + coll, key :

      { bucketId : 1, entityId : 1, variationId : 1 }

      } )

      { "ok" : 0, "errmsg" : "exception: invalid parameter: expected an object ()" }

        1. shard_null.js
          0.4 kB
          Greg Studer

            Assignee:
            greg_10gen Greg Studer
            Reporter:
            dan@mongodb.com Daniel Pasette (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: