Skip to content

Commit ef9e251

Browse files
[*] function has been renamed
1 parent 3332d6e commit ef9e251

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

ydb/core/persqueue/pq_impl.cpp

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4382,8 +4382,8 @@ void TPersQueue::CheckTxState(const TActorContext& ctx,
43824382

43834383
case NKikimrPQ::TTransaction::WAIT_RS_ACKS:
43844384
PQ_LOG_D("HaveAllRecipientsReceive " << tx.HaveAllRecipientsReceive() <<
4385-
", WriteIdIsDisabled " << WriteIdIsDisabled(tx.WriteId));
4386-
if (tx.HaveAllRecipientsReceive() && WriteIdIsDisabled(tx.WriteId)) {
4385+
", AllSupportivePartitionsHaveBeenDeleted " << AllSupportivePartitionsHaveBeenDeleted(tx.WriteId));
4386+
if (tx.HaveAllRecipientsReceive() && AllSupportivePartitionsHaveBeenDeleted(tx.WriteId)) {
43874387
DeleteTx(tx);
43884388
// implicitly switch to the state DELETING
43894389
}
@@ -4408,7 +4408,7 @@ void TPersQueue::CheckTxState(const TActorContext& ctx,
44084408
}
44094409
}
44104410

4411-
bool TPersQueue::WriteIdIsDisabled(const TMaybe<TWriteId>& writeId) const
4411+
bool TPersQueue::AllSupportivePartitionsHaveBeenDeleted(const TMaybe<TWriteId>& writeId) const
44124412
{
44134413
if (!writeId.Defined()) {
44144414
return true;
@@ -4420,16 +4420,12 @@ bool TPersQueue::WriteIdIsDisabled(const TMaybe<TWriteId>& writeId) const
44204420
const TTxWriteInfo& writeInfo = TxWrites.at(*writeId);
44214421

44224422
PQ_LOG_D("WriteId " << *writeId <<
4423-
" LongTxSubscriptionStatus=" << NKikimrLongTxService::TEvLockStatus_EStatus_Name(writeInfo.LongTxSubscriptionStatus) <<
4424-
" Partitions=" << writeInfo.Partitions.size());
4425-
bool disabled =
4426-
//(writeInfo.LongTxSubscriptionStatus != NKikimrLongTxService::TEvLockStatus::STATUS_SUBSCRIBED) &&
4423+
" Partitions.size=" << writeInfo.Partitions.size());
4424+
bool deleted =
44274425
writeInfo.Partitions.empty()
44284426
;
44294427

4430-
PQ_LOG_D("WriteId " << *writeId << " is " << (disabled ? "disabled" : "enabled"));
4431-
4432-
return disabled;
4428+
return deleted;
44334429
}
44344430

44354431
void TPersQueue::DeleteWriteId(const TMaybe<TWriteId>& writeId)

ydb/core/persqueue/pq_impl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ class TPersQueue : public NKeyValue::TKeyValueFlat {
528528
void AddCmdDeleteTx(NKikimrClient::TKeyValueRequest& request,
529529
ui64 txId);
530530

531-
bool WriteIdIsDisabled(const TMaybe<TWriteId>& writeId) const;
531+
bool AllSupportivePartitionsHaveBeenDeleted(const TMaybe<TWriteId>& writeId) const;
532532
void DeleteWriteId(const TMaybe<TWriteId>& writeId);
533533
};
534534

0 commit comments

Comments
 (0)