Skip to content

Commit b8d1289

Browse files
remove validation throught available reask in timeout (#8609)
1 parent 892228d commit b8d1289

File tree

2 files changed

+17
-10
lines changed

2 files changed

+17
-10
lines changed

ydb/core/tx/columnshard/columnshard_impl.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,11 +273,12 @@ bool TColumnShard::RemoveLongTxWrite(NIceDb::TNiceDb& db, const TWriteId writeId
273273
return true;
274274
} else {
275275
AFL_DEBUG(NKikimrServices::TX_COLUMNSHARD)("event", "cannot_remove_prepared_tx_insertion")("write_id", (ui64)writeId)("tx_id", txId);
276+
return false;
276277
}
277278
} else {
278279
AFL_DEBUG(NKikimrServices::TX_COLUMNSHARD)("event", "cannot_remove_removed_tx_insertion")("write_id", (ui64)writeId)("tx_id", txId);
280+
return true;
279281
}
280-
return false;
281282
}
282283

283284
void TColumnShard::TryAbortWrites(NIceDb::TNiceDb& db, NOlap::TDbWrapper& dbTable, THashSet<TWriteId>&& writesToAbort) {

ydb/core/tx/columnshard/transactions/operators/ev_write/primary.h

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -88,19 +88,25 @@ class TEvWriteCommitPrimaryTransactionOperator: public TEvWriteCommitSyncTransac
8888
virtual bool DoExecute(NTabletFlatExecutor::TTransactionContext& txc, const NActors::TActorContext& /*ctx*/) override {
8989
auto op = Self->GetProgressTxController().GetTxOperatorVerifiedAs<TEvWriteCommitPrimaryTransactionOperator>(TxId);
9090
auto copy = *op;
91-
AFL_VERIFY(copy.WaitShardsBrokenFlags.erase(TabletId))("remove_tablet_id", TabletId);
92-
copy.TxBroken = copy.TxBroken.value_or(false) || BrokenFlag;
93-
Self->GetProgressTxController().WriteTxOperatorInfo(txc, TxId, copy.SerializeToProto().SerializeAsString());
91+
if (copy.WaitShardsBrokenFlags.erase(TabletId)) {
92+
copy.TxBroken = copy.TxBroken.value_or(false) || BrokenFlag;
93+
Self->GetProgressTxController().WriteTxOperatorInfo(txc, TxId, copy.SerializeToProto().SerializeAsString());
94+
} else {
95+
AFL_WARN(NKikimrServices::TX_COLUMNSHARD)("event", "repeated shard broken_flag info")("shard_id", TabletId);
96+
}
9497
return true;
9598
}
9699
virtual void DoComplete(const NActors::TActorContext& /*ctx*/) override {
97100
auto op = Self->GetProgressTxController().GetTxOperatorVerifiedAs<TEvWriteCommitPrimaryTransactionOperator>(TxId);
98-
AFL_VERIFY(op->WaitShardsBrokenFlags.erase(TabletId))("remove_tablet_id", TabletId);
99-
op->TxBroken = op->TxBroken.value_or(false) || BrokenFlag;
100-
op->SendBrokenFlagAck(*Self, TabletId);
101-
AFL_DEBUG(NKikimrServices::TX_COLUMNSHARD)("event", "remove_tablet_id")("wait", JoinSeq(",", op->WaitShardsBrokenFlags))(
102-
"receive", TabletId);
103-
op->InitializeRequests(*Self);
101+
if (op->WaitShardsBrokenFlags.erase(TabletId)) {
102+
op->TxBroken = op->TxBroken.value_or(false) || BrokenFlag;
103+
op->SendBrokenFlagAck(*Self, TabletId);
104+
AFL_DEBUG(NKikimrServices::TX_COLUMNSHARD)("event", "remove_tablet_id")("wait", JoinSeq(",", op->WaitShardsBrokenFlags))(
105+
"receive", TabletId);
106+
op->InitializeRequests(*Self);
107+
} else {
108+
AFL_WARN(NKikimrServices::TX_COLUMNSHARD)("event", "repeated shard broken_flag info")("shard_id", TabletId);
109+
}
104110
}
105111

106112
public:

0 commit comments

Comments
 (0)