Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions ydb/core/mind/hive/hive_ut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3392,6 +3392,8 @@ Y_UNIT_TEST_SUITE(THiveTest) {
const ui64 testerTablet = MakeTabletID(false, 1);
CreateTestBootstrapper(runtime, CreateTestTabletInfo(hiveTablet, TTabletTypes::Hive), &CreateDefaultHive);

auto syncReassign = runtime.AddObserver<TEvHive::TEvReassignTablet>([] (auto&& ev) { ev->Get()->Record.SetAsync(false); });

TTabletTypes::EType tabletType = TTabletTypes::Dummy;
TVector<ui64> tablets;
for (ui64 i = 0; i < NUM_TABLETS; ++i) {
Expand Down Expand Up @@ -9075,6 +9077,11 @@ Y_UNIT_TEST_SUITE(TStorageBalanceTest) {
OnBootTablet(info);
return TTestActorRuntime::EEventAction::PROCESS;
}
case TEvHive::EvReassignTablet: {
auto& record = ev->Get<TEvHive::TEvReassignTablet>()->Record;
record.SetAsync(false);
return TTestActorRuntime::EEventAction::PROCESS;
}
}
return TTestActorRuntime::EEventAction::PROCESS;
};
Expand Down
1 change: 1 addition & 0 deletions ydb/core/mind/hive/storage_balancer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ class THiveStorageBalancer : public NActors::TActorBootstrapped<THiveStorageBala
if (!ev) {
ev = std::make_unique<TEvHive::TEvReassignTablet>(channel.TabletId);
ev->Record.SetReassignReason(NKikimrHive::TEvReassignTablet::HIVE_REASSIGN_REASON_BALANCE);
ev->Record.SetAsync(true);
}
ev->Record.AddChannels(channel.ChannelId);
}
Expand Down
Loading