-
Type: Task
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Catalog and Routing
The current implementation of the `$balancerConfiguration` aggregation stage incorrectly indicates that the balancer is enabled when the mode is set to anything other than "off". This was implemented considering the scenario where the `config.settings` collection is empty, which means the enabled value defaults to "true".
However, this approach causes issues when the mode is set to values other than "off", "full", or when the mode field is absent. This issue can occur when the user upgrades from a previous version that had more modes than just "full" and "off." In these cases, although the balancer should actually be disabled, `$balancerConfiguration` shows that it is enabled since the mode is not set to "off".
The implementation needs to be updated so that the enabled value is set to "true" only when the mode is set to "full" or when the mode field is absent. For all other mode values, the enabled value should be "false".