Skip to content

Commit 20ebf5c

Browse files
authored
[Backport stable-25-3-1] PR #30257: heap-use-after-free in a PQ tablet (#30260)
2 parents b827c92 + 9094b63 commit 20ebf5c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ydb/core/persqueue/pqtablet/pq_impl.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5204,8 +5204,10 @@ void TPersQueue::BeginDeletePartitions(const TWriteId& writeId, TTxWriteInfo& wr
52045204
PQ_LOG_TX_D("Already deleting WriteInfo");
52055205
return;
52065206
}
5207+
writeInfo.Deleting = true;
52075208
if (writeInfo.Partitions.empty()) {
52085209
TryDeleteWriteId(writeId, writeInfo, ActorContext());
5210+
TxWritesChanged = true;
52095211
} else {
52105212
for (auto& [_, partitionId] : writeInfo.Partitions) {
52115213
PQ_ENSURE(Partitions.contains(partitionId));
@@ -5214,7 +5216,6 @@ void TPersQueue::BeginDeletePartitions(const TWriteId& writeId, TTxWriteInfo& wr
52145216
Send(partition.Actor, new TEvPQ::TEvDeletePartition);
52155217
}
52165218
}
5217-
writeInfo.Deleting = true;
52185219
}
52195220

52205221
void TPersQueue::BeginDeletePartitions(const TDistributedTransaction& tx)

0 commit comments

Comments
 (0)