Better balancer interface

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Minor - P4
    • 1.9.0
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      User interaction with the balancer could be improved.

      Currently, to disable the balancer, users have to $set

      {stopped: true}

      in the balancer document. This is error-prone (it'd be easy to misspell "stopped', etc.) and there's no feedback.

      I propose a couple of commands for changing the balancer's state and getting the balancer's status.

      For example:

      db.runCommand(

      {balancerstatus: 1}

      )
      Returns:

      { state: 1,
      msg: "Balancing round"
      ops: [
      describe what's scheduled for this round / what's currently happening
      ]
      }

      db.runCommand(

      {disablebalancer: 1}

      )

      This prints a message indicating current balancer state and blocks if balancer is in the middle of something.

      db.runCommand(

      {enablebalancer: 1}

      )

      Re-enables balancing.

            Assignee:
            Unassigned
            Reporter:
            Kyle Banker (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: