diff options
author | gvit <gvit@ydb.tech> | 2022-10-27 12:19:55 +0300 |
---|---|---|
committer | gvit <gvit@ydb.tech> | 2022-10-27 12:19:55 +0300 |
commit | 5819083163f7e591bb0ec4fd36bc63088a59ce9d (patch) | |
tree | b279387b273f1fc43111532ae9ddeec891bdbd32 | |
parent | f414f1f14408c03972e5b9ae8f968df1ed493a69 (diff) | |
download | ydb-5819083163f7e591bb0ec4fd36bc63088a59ce9d.tar.gz |
do not fail in resolve state: catch exception and route that in internal error
-rw-r--r-- | ydb/core/kqp/executer/kqp_scan_executer.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/ydb/core/kqp/executer/kqp_scan_executer.cpp b/ydb/core/kqp/executer/kqp_scan_executer.cpp index f85b2f3d0e6..85eab7fbed6 100644 --- a/ydb/core/kqp/executer/kqp_scan_executer.cpp +++ b/ydb/core/kqp/executer/kqp_scan_executer.cpp @@ -73,13 +73,18 @@ public: TActorId KqpShardsResolverId; STATEFN(WaitResolveState) { - switch (ev->GetTypeRewrite()) { - hFunc(TEvKqpExecuter::TEvTableResolveStatus, HandleResolve); - hFunc(TEvKqpExecuter::TEvShardsResolveStatus, HandleResolve); - hFunc(TEvKqp::TEvAbortExecution, HandleAbortExecution); - hFunc(TEvents::TEvWakeup, HandleTimeout); - default: - UnexpectedEvent("WaitResolveState", ev->GetTypeRewrite()); + try { + switch (ev->GetTypeRewrite()) { + hFunc(TEvKqpExecuter::TEvTableResolveStatus, HandleResolve); + hFunc(TEvKqpExecuter::TEvShardsResolveStatus, HandleResolve); + hFunc(TEvKqp::TEvAbortExecution, HandleAbortExecution); + hFunc(TEvents::TEvWakeup, HandleTimeout); + default: + UnexpectedEvent("WaitResolveState", ev->GetTypeRewrite()); + } + + } catch (const yexception& e) { + InternalError(e.what()); } ReportEventElapsedTime(); } |