mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 16:48:27 -05:00
Cluster Manager: fixed infinite loop in rebalance (Issue #4941).
This commit is contained in:
parent
3d5e2c62e2
commit
4bce88b11f
@ -4887,7 +4887,7 @@ static int clusterManagerCommandRebalance(int argc, char **argv) {
|
|||||||
listRewind(involved, &li);
|
listRewind(involved, &li);
|
||||||
while ((ln = listNext(&li)) != NULL) {
|
while ((ln = listNext(&li)) != NULL) {
|
||||||
clusterManagerNode *n = ln->value;
|
clusterManagerNode *n = ln->value;
|
||||||
if (n->balance < 0 && total_balance > 0) {
|
if (n->balance <= 0 && total_balance > 0) {
|
||||||
n->balance--;
|
n->balance--;
|
||||||
total_balance--;
|
total_balance--;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user