diff options
author | Sergey Uzhakov <uzhastik@gmail.com> | 2022-04-19 23:25:00 +0300 |
---|---|---|
committer | Sergey Uzhakov <uzhastik@gmail.com> | 2022-04-19 23:25:00 +0300 |
commit | 7f7a8dc30242d15fa63fbd6d77693c2a2dfb3dec (patch) | |
tree | 1b86c463c47d339fc3911d194e97d5079f5a48bf | |
parent | 16c0269ee871e80d5bfed6efaf5ed29bf71b60d1 (diff) | |
download | ydb-7f7a8dc30242d15fa63fbd6d77693c2a2dfb3dec.tar.gz |
YQ-1053: fix crash on unpack error
ref:906a0a840a3aeb4f5cb208df3dbe3d028acd16d8
-rw-r--r-- | ydb/library/yql/dq/actors/task_runner/task_runner_actor_local.cpp | 59 |
1 files changed, 23 insertions, 36 deletions
diff --git a/ydb/library/yql/dq/actors/task_runner/task_runner_actor_local.cpp b/ydb/library/yql/dq/actors/task_runner/task_runner_actor_local.cpp index 508c5cf049..862576fe78 100644 --- a/ydb/library/yql/dq/actors/task_runner/task_runner_actor_local.cpp +++ b/ydb/library/yql/dq/actors/task_runner/task_runner_actor_local.cpp @@ -67,6 +67,14 @@ public: GetError(e).Release(), 0, ev->Cookie)); + } catch (...) { + ctx.Send( + new IEventHandle( + ev->Sender, + SelfId(), + GetError(CurrentExceptionMessage()).Release(), + /*flags=*/0, + ev->Cookie)); } } @@ -198,19 +206,7 @@ private: } void OnContinueRun(TEvContinueRun::TPtr& ev, const TActorContext& ctx) { - try { - DoContinueRun(ev, ctx); - } catch (const NKikimr::TMemoryLimitExceededException&) { - throw; - } catch (...) { - ctx.Send( - new IEventHandle( - ev->Sender, - SelfId(), - GetError(CurrentExceptionMessage()).Release(), - /*flags=*/0, - ev->Cookie)); - } + DoContinueRun(ev, ctx); } void OnChannelPush(TEvPush::TPtr& ev, const NActors::TActorContext& ctx) { @@ -382,31 +378,22 @@ private: if (MemoryQuota) { MemoryQuota->TrySetIncreaseMemoryLimitCallback(guard.GetMutex()); } - try { - TaskRunner->Prepare(ev->Get()->Task, ev->Get()->MemoryLimits, *ev->Get()->ExecCtx, ev->Get()->ParameterProvider); - auto event = MakeHolder<TEvTaskRunnerCreateFinished>( - TaskRunner->GetSecureParams(), - TaskRunner->GetTaskParams(), - TaskRunner->GetTypeEnv(), - TaskRunner->GetHolderFactory()); + TaskRunner->Prepare(ev->Get()->Task, ev->Get()->MemoryLimits, *ev->Get()->ExecCtx, ev->Get()->ParameterProvider); - ctx.Send( - new IEventHandle( - ev->Sender, - SelfId(), - event.Release(), - /*flags=*/0, - ev->Cookie)); - } catch (...) { - ctx.Send( - new IEventHandle( - ev->Sender, - SelfId(), - GetError(CurrentExceptionMessage()).Release(), - 0, - ev->Cookie)); - } + auto event = MakeHolder<TEvTaskRunnerCreateFinished>( + TaskRunner->GetSecureParams(), + TaskRunner->GetTaskParams(), + TaskRunner->GetTypeEnv(), + TaskRunner->GetHolderFactory()); + + ctx.Send( + new IEventHandle( + ev->Sender, + SelfId(), + event.Release(), + /*flags=*/0, + ev->Cookie)); } THolder<TEvDq::TEvAbortExecution> GetError(const NKikimr::TMemoryLimitExceededException&) { |