Skip to content

Commit 4bbb822

Browse files
committed
Handle all sorts of EvState events on shutdown
1 parent 7b73908 commit 4bbb822

File tree

1 file changed

+6
-14
lines changed

1 file changed

+6
-14
lines changed

ydb/core/kqp/executer_actor/kqp_data_executer.cpp

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2641,23 +2641,15 @@ class TKqpDataExecuter : public TKqpExecuterBase<TKqpDataExecuter, EExecType::Da
26412641
}
26422642

26432643
void HandleShutdown(TEvDqCompute::TEvState::TPtr& ev) {
2644-
if (ev->Get()->Record.GetState() == NDqProto::COMPUTE_STATE_FINISHED) {
2645-
YQL_ENSURE(Planner);
2646-
2647-
if (ev->Get()->Record.GetStatusCode() != NDqProto::StatusIds::ABORTED) {
2648-
return;
2649-
}
2644+
YQL_ENSURE(Planner);
26502645

2651-
TActorId actor = ev->Sender;
2652-
ui64 taskId = ev->Get()->Record.GetTaskId();
2646+
TActorId actor = ev->Sender;
2647+
ui64 taskId = ev->Get()->Record.GetTaskId();
26532648

2654-
Planner->CompletedCA(taskId, actor);
2649+
Planner->CompletedCA(taskId, actor);
26552650

2656-
if (Planner->GetPendingComputeTasks().empty() && Planner->GetPendingComputeActors().empty()) {
2657-
PassAway();
2658-
}
2659-
} else {
2660-
// TODO: handle other states.
2651+
if (Planner->GetPendingComputeTasks().empty() && Planner->GetPendingComputeActors().empty()) {
2652+
PassAway();
26612653
}
26622654
}
26632655

0 commit comments

Comments
 (0)