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

The sh.setBalancerState(false) command returns a misleading result on shard mongods

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • Server_Docs_20231030
    • None
    • Server
    • None

    Description

      The documented approach to stopping the shard balancer is to use the "sh.setBalancerState(false)" command on the mongos. However the command can also be run on any mongod, and no exception is raised.

      This is because the the command successfully writes to the local config, but this is nonsensical on a mongod. This can mislead the user into thinking the command has given the desired result.

      This server request is to add some exception handling to help prevent this confusion.

      Attachments

        Activity

          People

            kay.kim@mongodb.com Kay Kim (Inactive)
            emily.hall Emily Hall
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              6 years, 30 weeks ago