@@ -450,6 +450,27 @@ void TPersQueueReadBalancer::Handle(TEvPersQueue::TEvUpdateBalancerConfig::TPtr
450450 Path = std::move (record.GetPath ());
451451 TxId = record.GetTxId ();
452452 TabletConfig = std::move (record.GetTabletConfig ());
453+
454+ if (!TabletConfig.GetAllPartitions ().size ()) {
455+ for (auto & p : record.GetPartitions ()) {
456+ auto * ap = TabletConfig.AddAllPartitions ();
457+ ap->SetPartitionId (p.GetPartition ());
458+ ap->SetTabletId (p.GetTabletId ());
459+ ap->SetCreateVersion (p.GetCreateVersion ());
460+ ap->MutableKeyRange ()->SetFromBound (p.GetKeyRange ().GetFromBound ());
461+ ap->MutableKeyRange ()->SetToBound (p.GetKeyRange ().GetToBound ());
462+ ap->SetStatus (p.GetStatus ());
463+ ap->MutableParentPartitionIds ()->Reserve (p.GetParentPartitionIds ().size ());
464+ for (const auto parent : p.GetParentPartitionIds ()) {
465+ ap->MutableParentPartitionIds ()->AddAlreadyReserved (parent);
466+ }
467+ ap->MutableChildPartitionIds ()->Reserve (p.GetChildPartitionIds ().size ());
468+ for (const auto children : p.GetChildPartitionIds ()) {
469+ ap->MutableChildPartitionIds ()->AddAlreadyReserved (children);
470+ }
471+ }
472+ }
473+
453474 Migrate (TabletConfig);
454475
455476 SchemeShardId = record.GetSchemeShardId ();
@@ -832,7 +853,7 @@ void TPersQueueReadBalancer::UpdateConfigCounters() {
832853 return ;
833854 }
834855
835- size_t inactiveCount = std::count_if (TabletConfig.GetPartitions ().begin (), TabletConfig.GetPartitions ().end (), [](auto & p) {
856+ size_t inactiveCount = std::count_if (TabletConfig.GetAllPartitions ().begin (), TabletConfig.GetAllPartitions ().end (), [](auto & p) {
836857 return p.GetStatus () == NKikimrPQ::ETopicPartitionStatus::Inactive;
837858 });
838859
0 commit comments