diff --git a/ydb/core/persqueue/partition.cpp b/ydb/core/persqueue/partition.cpp index 00d69da63098..428edbcf0c9d 100644 --- a/ydb/core/persqueue/partition.cpp +++ b/ydb/core/persqueue/partition.cpp @@ -2757,7 +2757,7 @@ void TPartition::EndChangePartitionConfig(NKikimrPQ::TPQTabletConfig&& config, TString TPartition::GetKeyConfig() const { - return Sprintf("_config_%u", Partition.OriginalPartitionId); + return Sprintf("_config_%u", Partition.InternalPartitionId); } void TPartition::ChangePlanStepAndTxId(ui64 step, ui64 txId) diff --git a/ydb/core/persqueue/partition_init.cpp b/ydb/core/persqueue/partition_init.cpp index 8031f78f7d85..3964be436c81 100644 --- a/ydb/core/persqueue/partition_init.cpp +++ b/ydb/core/persqueue/partition_init.cpp @@ -200,6 +200,11 @@ void TInitConfigStep::Handle(TEvKeyValue::TEvResponse::TPtr& ev, const TActorCon Y_ABORT("bad status"); }; + // There should be no consumers in the configuration of the background partition. When creating a partition, + // the PQ tablet specifically removes all consumer settings from the config. + Y_ABORT_UNLESS(!Partition()->IsSupportive() || + (Partition()->Config.GetConsumers().empty() && Partition()->TabletConfig.GetConsumers().empty())); + Partition()->PartitionConfig = GetPartitionConfig(Partition()->Config, Partition()->Partition.OriginalPartitionId); Partition()->PartitionGraph = MakePartitionGraph(Partition()->Config); diff --git a/ydb/core/persqueue/pq_impl.cpp b/ydb/core/persqueue/pq_impl.cpp index bf6560bfbd63..1ccd2c0f8272 100644 --- a/ydb/core/persqueue/pq_impl.cpp +++ b/ydb/core/persqueue/pq_impl.cpp @@ -865,6 +865,7 @@ NKikimrPQ::TPQTabletConfig TPersQueue::MakeSupportivePartitionConfig() const partitionConfig.MutableReadRuleServiceTypes()->Clear(); partitionConfig.MutableReadRuleVersions()->Clear(); partitionConfig.MutableReadRuleGenerations()->Clear(); + partitionConfig.MutableConsumers()->Clear(); return partitionConfig; }