Skip to content

Commit 4237d50

Browse files
[-] the E message is sent only to the main partitions
1 parent cf0f1f4 commit 4237d50

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

ydb/core/persqueue/pq_impl.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4542,7 +4542,11 @@ void TPersQueue::SendProposeTransactionAbort(const TActorId& target,
45424542
void TPersQueue::SendEvProposePartitionConfig(const TActorContext& ctx,
45434543
TDistributedTransaction& tx)
45444544
{
4545-
for (auto& [_, partition] : Partitions) {
4545+
for (auto& [partitionId, partition] : Partitions) {
4546+
if (partitionId.IsSupportivePartition()) {
4547+
continue;
4548+
}
4549+
45464550
auto event = std::make_unique<TEvPQ::TEvProposePartitionConfig>(tx.Step, tx.TxId);
45474551

45484552
event->TopicConverter = tx.TopicConverter;
@@ -4553,7 +4557,7 @@ void TPersQueue::SendEvProposePartitionConfig(const TActorContext& ctx,
45534557
}
45544558

45554559
tx.PartitionRepliesCount = 0;
4556-
tx.PartitionRepliesExpected = Partitions.size();
4560+
tx.PartitionRepliesExpected = OriginalPartitionsCount;
45574561
}
45584562

45594563
TActorId TPersQueue::GetPartitionQuoter(const TPartitionId& partition) {

ydb/public/sdk/cpp/client/ydb_topic/ut/topic_to_table_ut.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -907,6 +907,9 @@ Y_UNIT_TEST_F(WriteToTopic_Demo_39, TFixture)
907907
AddConsumer("topic_A", {"consumer"});
908908

909909
CommitTx(tx, EStatus::SUCCESS);
910+
911+
auto messages = ReadFromTopic("topic_A", "consumer", TDuration::Seconds(2));
912+
UNIT_ASSERT_VALUES_EQUAL(messages.size(), 2);
910913
}
911914

912915
Y_UNIT_TEST_F(WriteToTopic_Demo_1, TFixture)

0 commit comments

Comments
 (0)