diff --git a/ydb/core/mind/hive/hive_ut.cpp b/ydb/core/mind/hive/hive_ut.cpp index dd9b1f0e76bd..22ea4427cf4c 100644 --- a/ydb/core/mind/hive/hive_ut.cpp +++ b/ydb/core/mind/hive/hive_ut.cpp @@ -3330,6 +3330,8 @@ Y_UNIT_TEST_SUITE(THiveTest) { const ui64 testerTablet = MakeTabletID(false, 1); CreateTestBootstrapper(runtime, CreateTestTabletInfo(hiveTablet, TTabletTypes::Hive), &CreateDefaultHive); + auto syncReassign = runtime.AddObserver([] (auto&& ev) { ev->Get()->Record.SetAsync(false); }); + TTabletTypes::EType tabletType = TTabletTypes::Dummy; TVector tablets; for (ui64 i = 0; i < NUM_TABLETS; ++i) { @@ -8991,6 +8993,11 @@ Y_UNIT_TEST_SUITE(TStorageBalanceTest) { OnBootTablet(info); return TTestActorRuntime::EEventAction::PROCESS; } + case TEvHive::EvReassignTablet: { + auto& record = ev->Get()->Record; + record.SetAsync(false); + return TTestActorRuntime::EEventAction::PROCESS; + } } return TTestActorRuntime::EEventAction::PROCESS; }; diff --git a/ydb/core/mind/hive/storage_balancer.cpp b/ydb/core/mind/hive/storage_balancer.cpp index 0687c7cad1a2..db9a75be88f3 100644 --- a/ydb/core/mind/hive/storage_balancer.cpp +++ b/ydb/core/mind/hive/storage_balancer.cpp @@ -177,6 +177,7 @@ class THiveStorageBalancer : public NActors::TActorBootstrapped(channel.TabletId); ev->Record.SetReassignReason(NKikimrHive::TEvReassignTablet::HIVE_REASSIGN_REASON_BALANCE); + ev->Record.SetAsync(true); } ev->Record.AddChannels(channel.ChannelId); } diff --git a/ydb/core/protos/config.proto b/ydb/core/protos/config.proto index 9328a525f161..d820a7a17766 100644 --- a/ydb/core/protos/config.proto +++ b/ydb/core/protos/config.proto @@ -2268,10 +2268,10 @@ message THiveConfig { reserved 66; optional double ObjectImbalanceToBalance = 67 [default = 0.02]; optional EHiveChannelBalanceStrategy ChannelBalanceStrategy = 68 [default = HIVE_CHANNEL_BALANCE_STRATEGY_WEIGHTED_RANDOM]; - optional uint64 MaxChannelHistorySize = 69 [default = 200]; + optional uint64 MaxChannelHistorySize = 69 [default = 10]; optional uint64 StorageInfoRefreshFrequency = 70 [default = 600000]; // send a query to BSC every x milliseconds - optional double MinStorageScatterToBalance = 71 [default = 999]; // storage balancer trigger is disabled by default - optional double MinGroupUsageToBalance = 72 [default = 0.1]; + optional double MinStorageScatterToBalance = 71 [default = 0.5]; // storage balancer trigger threshold (enabled by default) + optional double MinGroupUsageToBalance = 72 [default = 0.05]; optional uint64 StorageBalancerInflight = 73 [default = 1]; optional bool EnableDestroyOperations = 74 [default = false]; optional double NodeUsageRangeToKick = 75 [default = 0.2];