@@ -147,7 +147,7 @@ class TKqpDataExecuter: public TKqpExecuterBase<TKqpDataExecuter, EExecType::Dat
147147 ReadOnlyTx = IsReadOnlyTx ();
148148 }
149149
150- void CheckExecutionComplete () {
150+ bool CheckExecutionComplete () {
151151 ui32 notFinished = 0 ;
152152 for (const auto & x : ShardStates) {
153153 if (x.second .State != TShardState::EState::Finished) {
@@ -157,7 +157,7 @@ class TKqpDataExecuter: public TKqpExecuterBase<TKqpDataExecuter, EExecType::Dat
157157 }
158158 }
159159 if (notFinished == 0 && TBase::CheckExecutionComplete ()) {
160- return ;
160+ return true ;
161161 }
162162
163163 if (IsDebugLogEnabled ()) {
@@ -176,6 +176,8 @@ class TKqpDataExecuter: public TKqpExecuterBase<TKqpDataExecuter, EExecType::Dat
176176 }
177177 LOG_D (sb);
178178 }
179+
180+ return false ;
179181 }
180182
181183 bool ForceAcquireSnapshot () const {
@@ -2145,6 +2147,10 @@ class TKqpDataExecuter: public TKqpExecuterBase<TKqpDataExecuter, EExecType::Dat
21452147
21462148 ExecuteTasks ();
21472149
2150+ if (CheckExecutionComplete ()) {
2151+ return ;
2152+ }
2153+
21482154 ExecuterStateSpan = NWilson::TSpan (TWilsonKqp::DataExecuterRunTasks, ExecuterSpan.GetTraceId (), " RunTasks" , NWilson::EFlags::AUTO_END);
21492155 if (ImmediateTx) {
21502156 LOG_D (" ActorState: " << CurrentStateFuncName () << " , immediate tx, become ExecuteState" );
@@ -2255,7 +2261,7 @@ class TKqpDataExecuter: public TKqpExecuterBase<TKqpDataExecuter, EExecType::Dat
22552261 // Volatile transactions must always use generic readsets
22562262 VolatileTx ||
22572263 // Transactions with topics must always use generic readsets
2258- !topicTxs.empty () ||
2264+ !topicTxs.empty () ||
22592265 // HTAP transactions always use generic readsets
22602266 !evWriteTxs.empty ());
22612267
@@ -2588,8 +2594,6 @@ class TKqpDataExecuter: public TKqpExecuterBase<TKqpDataExecuter, EExecType::Dat
25882594 }
25892595 }
25902596 PropagateChannelsUpdates (updates);
2591-
2592- CheckExecutionComplete ();
25932597 }
25942598
25952599 void ExecuteTopicTabletTransactions (TTopicTabletTxs& topicTxs) {
0 commit comments