[SERVER-10824] sh.enableBalancing() requires an argument, silently no-ops with no argument Created: 19/Sep/13 Updated: 19/Nov/14 Resolved: 23/Oct/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Shell, Usability |
| Affects Version/s: | 2.5.2 |
| Fix Version/s: | 2.8.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Asya Kamsky | Assignee: | Matt Kangas |
| Resolution: | Done | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Minor Change | ||||
| Operating System: | ALL | ||||
| Steps To Reproduce: | mongos> sh.enableBalancing() |
||||
| Participants: | |||||
| Description |
|
sh.enableBalancing (and disableBalancing) take collection name as an argument. If nothing is passed in, it does not error (probably should!) and then tries to update nobalance flag for collection named "" which of course doesn't exist. Since it's easy for a user to assume this command enables/disables global cluster balancing, the no op and no warning or error is somewhat dangerous and misleading. |
| Comments |
| Comment by Githook User [ 23/Oct/14 ] | |||||||||||||||||||
|
Author: {u'username': u'kangas', u'name': u'Matt Kangas', u'email': u'matt.kangas@mongodb.com'}Message: | |||||||||||||||||||
| Comment by Kevin Pulo [ 18/Aug/14 ] | |||||||||||||||||||
|
Based on the phrasing "disable/enable balancing", I would suggest that calling sh.setBalancerState(false/true) (respectively) would give the expected user-intended behaviour, which is to enable/disable the balancer system-wide (in the absence of any argument). | |||||||||||||||||||
| Comment by Asya Kamsky [ 08/May/14 ] | |||||||||||||||||||
|
How about something like this:
|