Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-2625

Fix Balancer Policy Behavor Description for Tag-Aware Sharding

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • v1.3.1
    • None
    • manual

    Description

      The note

      "Note If the chunks in sharded collection are already balanced, then the balancer will not migrate any chunks. If chunks in a sharded collection are not balanced, the balancer migrates chunks in tagged ranges to shards associated with those tags."

      is incorrect. During a balancing round, determining if any tag violations exist takes precedence over whether chunks are evenly distributed or not.

      From "balancer_policy.cpp"

          MigrateInfo* BalancerPolicy::balance( const string& ns,
                                                const DistributionStatus& distribution,
                                                int balancedLastTime ) {
       
       
              // 1) check for shards that policy require to us to move off of:
              //    draining only
              // 2) check tag policy violations
              // 3) then we make sure chunks are balanced for each tag

      Attachments

        Activity

          People

            sam.kleinman Sam Kleinman (Inactive)
            asya.kamsky@mongodb.com Asya Kamsky
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              9 years, 51 weeks, 1 day ago