Commit bbd0ca95 authored by dejun.xdj's avatar dejun.xdj
Browse files

Fix code format issue.

parent 7becf54e
...@@ -4867,7 +4867,7 @@ static int clusterManagerCommandRebalance(int argc, char **argv) { ...@@ -4867,7 +4867,7 @@ static int clusterManagerCommandRebalance(int argc, char **argv) {
} }
/* Calculate the slots balance for each node. It's the number of /* Calculate the slots balance for each node. It's the number of
* slots the node should lose (if positive) or gain (if negative) * slots the node should lose (if positive) or gain (if negative)
* in order to be balanced. */ * in order to be balanced. */
int threshold_reached = 0, total_balance = 0; int threshold_reached = 0, total_balance = 0;
float threshold = config.cluster_manager_command.threshold; float threshold = config.cluster_manager_command.threshold;
i = 0; i = 0;
...@@ -4879,9 +4879,9 @@ static int clusterManagerCommandRebalance(int argc, char **argv) { ...@@ -4879,9 +4879,9 @@ static int clusterManagerCommandRebalance(int argc, char **argv) {
n->weight); n->weight);
n->balance = n->slots_count - expected; n->balance = n->slots_count - expected;
total_balance += n->balance; total_balance += n->balance;
/* Compute the percentage of difference between the /* Compute the percentage of difference between the
* expected number of slots and the real one, to see * expected number of slots and the real one, to see
* if it's over the threshold specified by the user. */ * if it's over the threshold specified by the user. */
int over_threshold = 0; int over_threshold = 0;
if (threshold > 0) { if (threshold > 0) {
if (n->slots_count > 0) { if (n->slots_count > 0) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment