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

Existing sharding rules seems to be immutable even if i drop the target collection and rebuild one.

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • 1.6.4
    • Sharding
    • None
    • CentOS release 5.4 (Final) , mongodb-linux-x86_64-1.6.4.tgz
    • Linux

    Description

      I've made a mistake by sharding a GridFS chunks collection with it's '_id'.
      Then i got told that, the chunks collection should be sharded with

      {files_id: 1, n: 1}

      .

      I tried to runCommand({shardcollection: "xx.xx.chunks', key: {files_id: 1, n: 1}}), then mongo told me something like 'the collection has already been sharded'.
      Cannot find a command to 'remove an existing sharding rule' so i drop the chunks collection, then rerun the command above, no errors.

      Then, with in database 'admin', i runned 'db.printShardingStatus()'. The result showed that the sharding rules on "xx.xx.chunks" had been modified as i wish.

      But when i run my script to load data into this GridFS, the same error message from pymongo raised.

      I've already found a solution, quite ugly by renaming the GridFS....

      Attachments

        Activity

          People

            Unassigned Unassigned
            guti.deng@gmail.com Guti.Deng
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: