[SERVER-35605] sh.setBalancerState() should check its argument type to avoid unexpected results Created: 14/Jun/18 Updated: 29/Oct/23 Resolved: 12/Jul/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 3.4.0, 3.6.0, 4.0.0-rc5 |
| Fix Version/s: | 4.1.1 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Spencer Brown | Assignee: | Sarah Zhou |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Sprint: | Sharding 2018-07-16 |
| Participants: | |
| Case: | (copied to CRM) |
| Description |
|
The sh.setBalancerState() function in the mongo shell is coded thus:
As a consequence, running sh.setBalancerState("true") actually stops the balancer, as does sh.setBalancerState(). These are surprising results. Suggest adding a type check to the code before the if statement:
|
| Comments |
| Comment by Githook User [ 12/Jul/18 ] |
|
Author: {'name': 'Sarah Zhou', 'email': 'sarah.zhou@10gen.com'}Message: |