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

restoring data into a sharded collection but it is not balanced

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Cannot Reproduce
    • Affects Version/s: 2.2.3
    • Fix Version/s: None
    • Component/s: Sharding
    • Labels:
      None
    • Environment:
      Linux 2.6.18-308.el5 #1 SMP Fri Jan 27 17:17:51 EST 2012 x86_64 x86_64 x86_64 GNU/Linux
    • Operating System:
      Linux
    • Steps To Reproduce:
      Hide

      took a mongodump of an unshared collection collA.
      Enabled sharding on the same database
      Enabled sharding on another empty collection collB
      mongorestore collA into CollB expecting it to shard.
      It has created 3 chunks but all the data (10GB) has gone into one chunk.

      Show
      took a mongodump of an unshared collection collA. Enabled sharding on the same database Enabled sharding on another empty collection collB mongorestore collA into CollB expecting it to shard. It has created 3 chunks but all the data (10GB) has gone into one chunk.

      Description

      mongorestore not sharding data correctly and there are errors in the mongos log

      Wed Jul 10 09:08:57 [conn167] warning: splitChunk failed - cmd:
      errmsg: "the collection's metadata lock is taken", ok: 0.0 }

      I stopped the mongorestore after a while and have wait since to see if the balancer would move chunks around but nothing has happened.

      Balancer is running.
      db.locks.find() returns nothing

      Any ideas why it has not sharded the data? Should it have during the restore?

      The shard key will contain strings

      When creating the the 3 chunks it has created them as
      minkey -> A
      A-Z
      Z-> maxkey

      this explains why all data is in chunk 2 but after 10GB of data I would have expected A-Z to split by now. We have a large distribution of values and our chunk size is 256MB

        Attachments

          Activity

            People

            Assignee:
            andre.defrere Andre de Frere
            Reporter:
            gconway Gary Conway
            Participants:
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: