You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pegasus.apache.org by "empiredan (via GitHub)" <gi...@apache.org> on 2024/03/25 09:15:36 UTC

Re: [PR] fix(balance): Distinguish cluster balanced or collecting balance info interruptted [incubator-pegasus]

empiredan commented on code in PR #1951:
URL: https://github.com/apache/incubator-pegasus/pull/1951#discussion_r1537251566


##########
src/meta/greedy_load_balancer.cpp:
##########
@@ -163,7 +164,10 @@ void greedy_load_balancer::greedy_balancer(const bool balance_checker)
     for (auto &kv : *(t_global_view->nodes)) {
         node_state &ns = kv.second;
         if (!all_replica_infos_collected(ns)) {
+            _all_replca_infos_collected = false;
             return;
+        } else {
+            _all_replca_infos_collected = true;
         }

Review Comment:
   ```suggestion
           _all_replca_infos_collected = all_replica_infos_collected(ns);
           if (!_all_replca_infos_collected) {
               return;
           }
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@pegasus.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pegasus.apache.org
For additional commands, e-mail: dev-help@pegasus.apache.org