@@ -24,7 +24,6 @@ TValidatedDataTx::TValidatedDataTx(TDataShard *self,
2424 , EngineBay(self, txc, ctx, stepTxId)
2525 , ErrCode(NKikimrTxDataShard::TError::OK)
2626 , TxSize(0 )
27- , TxCacheUsage(0 )
2827 , IsReleased(false )
2928 , BuiltTaskRunner(false )
3029 , IsReadOnly(true )
@@ -280,11 +279,10 @@ bool TValidatedDataTx::CheckCancelled(ui64 tabletId) {
280279 TInstant now = AppData ()->TimeProvider ->Now ();
281280 Cancelled = (now >= Deadline ());
282281
283- Cancelled = Cancelled || gCancelTxFailPoint .Check (tabletId, TxId ());
282+ Cancelled = Cancelled || gCancelTxFailPoint .Check (tabletId, GetTxId ());
284283
285284 if (Cancelled) {
286- LOG_NOTICE_S (*TlsActivationContext->ExecutorThread .ActorSystem , NKikimrServices::TX_DATASHARD,
287- " CANCELLED TxId " << TxId () << " at " << tabletId);
285+ LOG_NOTICE_S (*TlsActivationContext->ExecutorThread .ActorSystem , NKikimrServices::TX_DATASHARD, " CANCELLED TxId " << GetTxId () << " at " << tabletId);
288286 }
289287 return Cancelled;
290288}
@@ -332,7 +330,7 @@ void TActiveTransaction::FillTxData(TValidatedDataTx::TPtr dataTx)
332330 Y_ABORT_UNLESS (!DataTx);
333331 Y_ABORT_UNLESS (TxBody.empty () || HasVolatilePrepareFlag ());
334332
335- Target = dataTx->Source ();
333+ Target = dataTx->GetSource ();
336334 DataTx = dataTx;
337335
338336 if (DataTx->HasStreamResponse ())
@@ -543,9 +541,7 @@ void TActiveTransaction::ReleaseTxData(NTabletFlatExecutor::TTxMemoryProviderBas
543541 DataTx->ReleaseTxData ();
544542 // Immediate transactions have no body stored.
545543 if (!IsImmediate () && !HasVolatilePrepareFlag ()) {
546- UntrackMemory ();
547- TxBody.clear ();
548- TrackMemory ();
544+ ClearTxBody ();
549545 }
550546
551547 // InReadSets.clear();
@@ -687,50 +683,6 @@ void TActiveTransaction::FinalizeDataTxPlan()
687683 RewriteExecutionPlan (plan);
688684}
689685
690- class TFinalizeDataTxPlanUnit : public TExecutionUnit {
691- public:
692- TFinalizeDataTxPlanUnit (TDataShard &dataShard, TPipeline &pipeline)
693- : TExecutionUnit(EExecutionUnitKind::FinalizeDataTxPlan, false , dataShard, pipeline)
694- { }
695-
696- bool IsReadyToExecute (TOperation::TPtr) const override {
697- return true ;
698- }
699-
700- EExecutionStatus Execute (TOperation::TPtr op,
701- TTransactionContext &txc,
702- const TActorContext &ctx) override
703- {
704- Y_UNUSED (txc);
705- Y_UNUSED (ctx);
706-
707- TActiveTransaction *tx = dynamic_cast <TActiveTransaction*>(op.Get ());
708- Y_VERIFY_S (tx, " cannot cast operation of kind " << op->GetKind ());
709- Y_VERIFY_S (tx->IsDataTx (), " unexpected non-data tx" );
710-
711- if (auto dataTx = tx->GetDataTx ()) {
712- // Restore transaction type flags
713- if (dataTx->IsKqpDataTx () && !tx->IsKqpDataTransaction ())
714- tx->SetKqpDataTransactionFlag ();
715- Y_VERIFY_S (!dataTx->IsKqpScanTx (), " unexpected kqp scan tx" );
716- }
717-
718- tx->FinalizeDataTxPlan ();
719-
720- return EExecutionStatus::Executed;
721- }
722-
723- void Complete (TOperation::TPtr op,
724- const TActorContext &ctx) override
725- {
726- Y_UNUSED (op);
727- Y_UNUSED (ctx);
728- }
729- };
730-
731- THolder<TExecutionUnit> CreateFinalizeDataTxPlanUnit (TDataShard &dataShard, TPipeline &pipeline) {
732- return THolder (new TFinalizeDataTxPlanUnit (dataShard, pipeline));
733- }
734686
735687void TActiveTransaction::BuildExecutionPlan (bool loaded)
736688{
0 commit comments