MB-46725 (7.0.1) per discussion with Deepkaran Salooja to implement a feature of a periodic background Planner run to update the rebalance_service_manager.go ServiceMgr.state.isBalanced flag automatically. The issue is that currently there is nothing that makes an absolute calculation as to whether GSI is balanced or not. Thus if partitions or replicas become unavailable due to unsafe failovers or many indexes are added or dropped, currently GSI will not set isBalanced = false to enable the Rebalance button in the UI because it does not do any kind of check for these things.
Jeelan Poola FYI.
Repro from original MB for historical purposes:
1. Create a 6 node cluster. (3 kv + 3 index,n1ql). See
2. Create 2 partition indexes using the following commands. See
3. Bring down 4 nodes. (2 kv + 2 index,n1ql) using systemctl stop couchbase-server.
4. QL failover all the 4 nodes. See
All the 4 nodes are out of the cluster. However rebalance button is not enabled.
I think it's because there is only one KV node in the cluster and we think there is nothing to redistribute. However, as seen from post QL failover we can see there is only 3 partitions now and a rebalance would be required to rebuild other 6 partitions. For this to happen we need to have rebalance button enabled which is not the case here. See
cc: Amit Kulkarni