aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzalyalov <zalyalov@yandex-team.com>2023-04-28 09:39:57 +0300
committerzalyalov <zalyalov@yandex-team.com>2023-04-28 09:39:57 +0300
commit046eb6808a506256e1e06a3b78af7cda1a228de8 (patch)
tree222eca5934dbef8ff7904771fd9615c5b06fa0d4
parentbc532c9f50aab19e4b98068661ad1b9295a7cb8f (diff)
downloadydb-046eb6808a506256e1e06a3b78af7cda1a228de8.tar.gz
fix hive balancer life cycle
Hive Balancer now waits for all tablet movements to complete before finishing. Previous version sometimes allowed balancer to finish while some requests were still in flight. This extension of lifetime may in some cases lead to more work being accomplished by the balancer.
-rw-r--r--ydb/core/mind/hive/balancer.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/ydb/core/mind/hive/balancer.cpp b/ydb/core/mind/hive/balancer.cpp
index 9106fceccd9..b8084d6468d 100644
--- a/ydb/core/mind/hive/balancer.cpp
+++ b/ydb/core/mind/hive/balancer.cpp
@@ -280,7 +280,9 @@ protected:
}
}
}
- return PassAway();
+ if (KickInFlight == 0) {
+ return PassAway();
+ }
}
void Handle(TEvPrivate::TEvRestartComplete::TPtr& ev) {