[SERVER-19980] The sh.setBalancerState(false) command returns a misleading result on shard mongods Created: 17/Aug/15  Updated: 21/Jul/17  Resolved: 28/Aug/15

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 2.6.3
Fix Version/s: 3.1.8

Type: Bug Priority: Minor - P4
Reporter: Luke Prochazka Assignee: Sam Kleinman (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
is documented by DOCS-8963 The sh.setBalancerState(false) comman... Closed
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

Follow our docuemented procesdures in http://docs.mongodb.org/manual/reference/method/sh.setBalancerState/

Apply this to a mongod.

Sprint: Build 8 08/31/15
Participants:

 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.



 Comments   
Comment by Ernie Hershey [ 05/Nov/15 ]

Should there be a server error thrown as well?

Also I'm leaving 'docs changes needed' set to yes under the assumption that we should document on the referenced docs page something about what it means to run those commands against mongod, or why you can't, or at least the fact that you can't.

Comment by Githook User [ 28/Aug/15 ]

Author:

{u'username': u'tychoish', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}

Message: SERVER-19980: only permit sh.setBalancerState against mongos intances
Branch: master
https://github.com/mongodb/mongo/commit/622dae556361380471b4ce0ef4e761e2342a6adb

Generated at Thu Feb 08 03:52:45 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.