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

_id strangeness on sharded collection

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major - P3 Major - P3
    • None
    • 2.0.6
    • Sharding
    • None
    • mongodb-linux-i686-2.0.6
    • Linux

    Description

      mongos> use bug
      switched to db bug
      mongos> db.t.insert(

      {'_id':[1,2,3]}

      )
      _id cannot be an array

      mongos> use admin
      switched to db admin
      mongos> db.runCommand(

      { enablesharding : "bug" }

      );

      { "ok" : 1 }

      mongos> db.runCommand( { shardcollection : "bug.s", key :

      { _id : 1 }

      } )

      { "collectionsharded" : "bug.s", "ok" : 1 }

      mongos> use bug
      switched to db bug
      mongos> db.s.insert(

      {'_id':[1,2,3]}

      )
      mongos> db.s.find()

      { "_id" : ObjectId("4feb209a465c15a3483518f7"), "_id" : ObjectId("4feb209a465c15a3483518f7") }

      Attachments

        Activity

          People

            Unassigned Unassigned
            grubberr Sergey Chvalyuk
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: