XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • ALL

    Description

      mongos> db.FeedData.insert(

      { item: "card", qty: 15 }

      )
      error preparing documents for insert :: caused by :: tried to insert object with no valid shard key for

      { d.auction_id_64: "hashed" }

      :

      { _id: ObjectId('524c0a6b3a6b2a9f5ee3621d'), item: "card", qty: 15.0 }

      mongos> db.FeedData.insert(

      { item: "card", qty: 15, 'd.auction_id_64': 1234 }

      )
      Wed Oct 2 11:59:03.877 can't have . in field names [d.auction_id_64] at src/mongo/shell/collection.js:143
      mongos>

      The only problem here is shard key is d.auction_id_64. What am I missing here?!

      { "_id" : "lld", "partitioned" : true, "primary" : "mongo-cl1-sh1" }

      lld.FeedData
      shard key:

      { "d.auction_id_64" : "hashed" }

      chunks:
      mongo-cl1-sh1 2
      mongo-cl1-sh10 2
      mongo-cl1-sh2 2
      mongo-cl1-sh3 2
      mongo-cl1-sh4 2
      mongo-cl1-sh5 2
      mongo-cl1-sh6 2
      mongo-cl1-sh7 2
      mongo-cl1-sh8 2
      mongo-cl1-sh9 2

      Attachments

        Activity

          People

            Unassigned Unassigned
            cwbeck Chris Beck
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: