diff options
author | vporyadke <48287411+vporyadke@users.noreply.github.com> | 2023-12-07 19:54:38 +0300 |
---|---|---|
committer | alexv-smirnov <alex@ydb.tech> | 2023-12-07 20:41:54 +0300 |
commit | 5ddac82c510633e79e4a48d13f708c85765cb5e9 (patch) | |
tree | becbfadb7a59bd8892434dd211d8fd9fbf6dcaf8 | |
parent | 60c5bab7719a615a823e99c0bc8e41cf4b03b443 (diff) | |
download | ydb-5ddac82c510633e79e4a48d13f708c85765cb5e9.tar.gz |
correctly handle the case with MaxInFlight > MaxMovements
correctly handle the case with MaxInFlight > MaxMovements
Pull Request resolved: https://github.com/ydb-platform/ydb/pull/476
-rw-r--r-- | ydb/core/mind/hive/balancer.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/ydb/core/mind/hive/balancer.cpp b/ydb/core/mind/hive/balancer.cpp index 725f697b66..7def1b1e79 100644 --- a/ydb/core/mind/hive/balancer.cpp +++ b/ydb/core/mind/hive/balancer.cpp @@ -166,7 +166,8 @@ protected: } bool CanKickNextTablet() const { - return KickInFlight < Settings.MaxInFlight; + return KickInFlight < Settings.MaxInFlight + && (Settings.MaxMovements == 0 || Movements < Settings.MaxMovements); } void UpdateProgress() { @@ -267,9 +268,6 @@ protected: } void KickNextTablet() { - if (!CanKickNextTablet()) { - return; - } if (Settings.MaxMovements != 0 && Movements >= Settings.MaxMovements) { if (KickInFlight > 0) { return; |