-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Fully Compatible
-
ALL
-
Sharding 2020-07-27, Sharding 2020-08-10, Sharding 2020-08-24, Sharding 2020-09-21, Sharding 2020-10-05, Sharding 2020-10-19
If a config server has the following setting document:
{ "_id" : "balancer", "_secondaryThrottle" : false, "mode" : "off" }
sh.getBalancerState() will return true because there is no "stopped" field, despite the mode field being set to "off."
This incorrect reporting can cause confusion. We should error when a field we expect to exist does not exist. If it's expected that the stopped field may not exist, then we shouldn't rely on it for checking the balancer state.
Please be mindful of internal callers of sh.getBalancerState() like sh.status() when implementing this change.
- is duplicated by
-
SERVER-34504 sh.getBalancerState does not consider the {mode:off} balancer setting
- Closed