[SERVER-2680] Better balancer interface Created: 04/Mar/11 Updated: 12/Jul/16 Resolved: 29/Apr/11 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 1.9.0 |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Kyle Banker | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: |
| Description |
|
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}) { state: 1, 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. |
| Comments |
| Comment by auto [ 29/Apr/11 ] |
|
Author: {u'login': u'erh', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'}Message: shell helpers for turning on/off balancer |
| Comment by Kyle Banker [ 04/Mar/11 ] |
|
I think that makes sense. maybe use "cluster" as the prefix instead: cluster.stopBalancer(); Main thing to make balancer operations more determinate and predictable from the user's perspective. |
| Comment by Eliot Horowitz (Inactive) [ 04/Mar/11 ] |
|
What do you think of a similar thing to the rs helper so sharding.stopBalancer() sharding.addShard( "..." ) ... |