Cannot shard database DCU using id as hash shard key

XMLWordPrintableJSON

    • Type: Question
    • Resolution: Done
    • Priority: Critical - P2
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • 0
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      I ran the following :

      sh.shardCollection(“DCU.UserData", { "id": "hashed" } )
      

      and I simply cannot shard based on that key. Why ? This is a new production server we are setting up in AWS.

      mongos> sh.shardCollection(“DCU.UserData", { "id": "hashed" } )
      2015-06-08T17:09:28.921-0700 E QUERY    SyntaxError: Unexpected token ILLEGAL
      mongos> sh.shardCollection( “DCU.UserData", {  id: "hashed" } )
      2015-06-08T17:13:18.759-0700 E QUERY    SyntaxError: Unexpected token ILLEGAL
      mongos> sh.shardCollection( “DCU.UserData", { id: "hashed" } )
      2015-06-08T17:14:41.012-0700 E QUERY    SyntaxError: Unexpected token ILLEGAL
      

            Assignee:
            Unassigned
            Reporter:
            Van Pham
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: