After scaling out, Pegasus determines whether the shards are balanced by checking if the balance operation counts are equal to 0. However, since the meta server returns counts = 0 when it cannot collect all replicas information, this leads to the premature termination of balancing. Therefore, in such cases, the counts should be equal to -1
What is changed and how does it work?
A new bool variable introduce into class greedy_load_balancer to control balance operation count whether be -1.
class greedy_load_balancer{
private:
bool _all_replca_infos_collected;
}
What problem does this PR solve?
After scaling out, Pegasus determines whether the shards are balanced by checking if the balance operation counts are equal to 0. However, since the meta server returns counts = 0 when it cannot collect all replicas information, this leads to the premature termination of balancing. Therefore, in such cases, the counts should be equal to -1
What is changed and how does it work?
A new bool variable introduce into class greedy_load_balancer to control balance operation count whether be -1.