Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanmorozov333 committed Dec 27, 2024
1 parent 1f54c46 commit 378684e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ class TEvWriteCommitPrimaryTransactionOperator: public TEvWriteCommitSyncTransac
using TBase = NOlap::NDataSharing::TExtendedTransactionBase<TColumnShard>;
const ui64 TxId;
const ui64 TabletId;
bool CheckFinishedFlag = false;

virtual bool DoExecute(NTabletFlatExecutor::TTransactionContext& txc, const NActors::TActorContext& /*ctx*/) override {
auto op = Self->GetProgressTxController().GetTxOperatorVerifiedAs<TEvWriteCommitPrimaryTransactionOperator>(TxId, true);
Expand All @@ -141,6 +142,7 @@ class TEvWriteCommitPrimaryTransactionOperator: public TEvWriteCommitSyncTransac
AFL_WARN(NKikimrServices::TX_COLUMNSHARD_TX)("event", "ack_tablet_duplication")("wait", JoinSeq(",", op->WaitShardsResultAck))(
"receive", TabletId);
} else {
CheckFinishedFlag = true;
AFL_DEBUG(NKikimrServices::TX_COLUMNSHARD_TX)("event", "ack_tablet")("wait", JoinSeq(",", op->WaitShardsResultAck))(
"receive", TabletId);
Self->GetProgressTxController().WriteTxOperatorInfo(txc, TxId, op->SerializeToProto().SerializeAsString());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class TEvWriteCommitSecondaryTransactionOperator: public TEvWriteCommitSyncTrans
private:
using TBase = NOlap::NDataSharing::TExtendedTransactionBase<TColumnShard>;
const ui64 TxId;
bool NeedContinueFlag = false;

virtual bool DoExecute(NTabletFlatExecutor::TTransactionContext& txc, const NActors::TActorContext& ctx) override {
auto op = Self->GetProgressTxController().GetTxOperatorVerifiedAs<TEvWriteCommitSecondaryTransactionOperator>(TxId, true);
Expand All @@ -74,12 +75,15 @@ class TEvWriteCommitSecondaryTransactionOperator: public TEvWriteCommitSyncTrans
}
Self->GetProgressTxController().WriteTxOperatorInfo(txc, TxId, op->SerializeToProto().SerializeAsString());
if (!op->NeedReceiveBroken) {
Self->EnqueueProgressTx(ctx, TxId);
NeedContinueFlag = true;
}
}
return true;
}
virtual void DoComplete(const NActors::TActorContext& /*ctx*/) override {
virtual void DoComplete(const NActors::TActorContext& ctx) override {
if (NeedContinueFlag) {
Self->EnqueueProgressTx(ctx, TxId);
}
}

public:
Expand Down Expand Up @@ -111,7 +115,6 @@ class TEvWriteCommitSecondaryTransactionOperator: public TEvWriteCommitSyncTrans
if (BrokenFlag) {
Self->GetProgressTxController().ExecuteOnCancel(TxId, txc);
}
Self->EnqueueProgressTx(ctx, TxId);
}
return true;
}
Expand All @@ -124,6 +127,7 @@ class TEvWriteCommitSecondaryTransactionOperator: public TEvWriteCommitSyncTrans
if (BrokenFlag) {
Self->GetProgressTxController().CompleteOnCancel(TxId, ctx);
}
Self->EnqueueProgressTx(ctx, TxId);
}
}

Expand Down

0 comments on commit 378684e

Please sign in to comment.