acelyc111 commented on code in PR #1951:
URL:
https://github.com/apache/incubator-pegasus/pull/1951#discussion_r1526065284
##########
src/meta/greedy_load_balancer.h:
##########
@@ -74,6 +74,7 @@ class greedy_load_balancer : public server_load_balancer
migration_list *t_migration_result;
int t_alive_nodes;
int t_operation_counters[MAX_COUNT];
+ bool _all_replca_info;
Review Comment:
How about renaming to `_all_replica_infos_collected`?
##########
src/meta/greedy_load_balancer.cpp:
##########
@@ -235,7 +239,14 @@ void greedy_load_balancer::report(const
dsn::replication::migration_list &list,
}
}
+ if (!_all_replca_info) {
+ counters[ALL_COUNT] = -1;
+ }
+
::memcpy(t_operation_counters, counters, sizeof(counters));
+ LOG_DEBUG(
+ "balance checker operation count = %d, due to meta server hasn't
collected all replica",
Review Comment:
```suggestion
"balance checker operation count = {}, due to meta server hasn't
collected all replica",
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]