Skip to content

Commit aa7dc51

Browse files
Merge c717363 into c805655
2 parents c805655 + c717363 commit aa7dc51

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

ydb/core/persqueue/partition.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2763,7 +2763,7 @@ void TPartition::EndChangePartitionConfig(NKikimrPQ::TPQTabletConfig&& config,
27632763

27642764
TString TPartition::GetKeyConfig() const
27652765
{
2766-
return Sprintf("_config_%u", Partition.OriginalPartitionId);
2766+
return Sprintf("_config_%u", Partition.InternalPartitionId);
27672767
}
27682768

27692769
void TPartition::ChangePlanStepAndTxId(ui64 step, ui64 txId)

ydb/core/persqueue/partition_init.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,11 @@ void TInitConfigStep::Handle(TEvKeyValue::TEvResponse::TPtr& ev, const TActorCon
200200
Y_ABORT("bad status");
201201
};
202202

203+
// There should be no consumers in the configuration of the background partition. When creating a partition,
204+
// the PQ tablet specifically removes all consumer settings from the config.
205+
Y_ABORT_UNLESS(!Partition()->IsSupportive() ||
206+
(Partition()->Config.GetConsumers().empty() && Partition()->TabletConfig.GetConsumers().empty()));
207+
203208
Partition()->PartitionConfig = GetPartitionConfig(Partition()->Config, Partition()->Partition.OriginalPartitionId);
204209
Partition()->PartitionGraph = MakePartitionGraph(Partition()->Config);
205210

ydb/core/persqueue/pq_impl.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -865,6 +865,7 @@ NKikimrPQ::TPQTabletConfig TPersQueue::MakeSupportivePartitionConfig() const
865865
partitionConfig.MutableReadRuleServiceTypes()->Clear();
866866
partitionConfig.MutableReadRuleVersions()->Clear();
867867
partitionConfig.MutableReadRuleGenerations()->Clear();
868+
partitionConfig.MutableConsumers()->Clear();
868869

869870
return partitionConfig;
870871
}

0 commit comments

Comments
 (0)