Skip to content

Commit cd60eb4

Browse files
committed
Fixed CA checking for HandleShutdown TEvDqCompute::TEvState
1 parent b5b53d0 commit cd60eb4

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

ydb/core/kqp/executer_actor/kqp_data_executer.cpp

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2684,10 +2684,16 @@ class TKqpDataExecuter : public TKqpExecuterBase<TKqpDataExecuter, EExecType::Da
26842684
if (ev->Get()->Record.GetState() == NDqProto::COMPUTE_STATE_FAILURE) {
26852685
YQL_ENSURE(Planner);
26862686

2687-
TActorId actor = ev->Sender;
2688-
ui64 taskId = ev->Get()->Record.GetTaskId();
2689-
2690-
Planner->CompletedCA(taskId, actor);
2687+
const auto& task = TasksGraph.GetTask(ev->Get()->Record.GetTaskId());
2688+
if (!task.Meta.Completed) {
2689+
if (task.ComputeActorId) {
2690+
YQL_ENSURE(ev->Sender == task.ComputeActorId);
2691+
Planner->CompletedCA(task.Id, task.ComputeActorId);
2692+
} else {
2693+
// CA didn't have time to register
2694+
Planner->TaskNotStarted(task.Id);
2695+
}
2696+
}
26912697

26922698
if (Planner->GetPendingComputeTasks().empty() && Planner->GetPendingComputeActors().empty()) {
26932699
PassAway();

0 commit comments

Comments
 (0)