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

mongo db balancer when there is 1,76,000 entries in tags collection of config database?

    XMLWordPrintableJSON

Details

    • Icon: Question Question
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • 3.2.6
    • Sharding
    • None

    Description

      am trying tag based sharding in mongo db with tag ranges .Since i do have a range for my shard key .I came up with an idea of adding range for each value of shard key.

      ex:

      sh.addTagRange( ".",{ shardKey: 1 },{ shardKey: 2 },"tag_name")
      

      Since value 2 of shardKey in the above command is excluded in in the range .The range will cover only 1 value. I do this for all the documents(doc size : 1,76000 docs) . I have 2 tags and 2 shards .Each has only 1 node ie primary node.

      When i do this and do sh.startBalancer() .The data is not getting distributed across the shards as per the tag .

      Is this approach correct or having such large number of ranges in tags collection of config db is not supported or recommended ?

      Attachments

        Activity

          People

            Unassigned Unassigned
            abhiullals Abhishek
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: