aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhor911 <hor911@yandex-team.ru>2022-02-24 13:15:42 +0300
committerhor911 <hor911@yandex-team.ru>2022-02-24 13:15:42 +0300
commite2da0162789e5968c504ccb8045e8ebf0c3248ea (patch)
tree804088732c0c42333c525654dbe6fd37a7616c44
parent28f4ebc21f1f4c7d2e92741887e1f508489c203b (diff)
downloadydb-e2da0162789e5968c504ccb8045e8ebf0c3248ea.tar.gz
Retry out of memory (and everything else by default).
ref:b68940c0a36d16383af3fa2b94b2d295db48c562
-rw-r--r--ydb/core/yq/libs/actors/result_writer.cpp5
-rw-r--r--ydb/core/yq/libs/actors/run_actor.cpp1
-rw-r--r--ydb/library/yql/providers/dq/actors/task_controller.cpp8
3 files changed, 9 insertions, 5 deletions
diff --git a/ydb/core/yq/libs/actors/result_writer.cpp b/ydb/core/yq/libs/actors/result_writer.cpp
index d51b8aae9f..b063e73ffb 100644
--- a/ydb/core/yq/libs/actors/result_writer.cpp
+++ b/ydb/core/yq/libs/actors/result_writer.cpp
@@ -84,7 +84,7 @@ private:
}
void OnUndelivered(NActors::TEvents::TEvUndelivered::TPtr&, const NActors::TActorContext& ) {
- auto req = MakeHolder<TEvDqFailure>(TIssue("Undelivered").SetCode(NYql::DEFAULT_ERROR, TSeverityIds::S_ERROR), /*retriable=*/ false, /*needFallback=*/false);
+ auto req = MakeHolder<TEvDqFailure>(TIssue("Undelivered").SetCode(NYql::DEFAULT_ERROR, TSeverityIds::S_ERROR), true, /*needFallback=*/false);
Send(ExecuterId, req.Release());
HasError = true;
}
@@ -93,8 +93,7 @@ private:
LOG_E("ControlPlane WriteResult Issues: " << issues.ToString());
Issues.AddIssues(issues);
HasError = true;
- auto req = MakeHolder<TEvDqFailure>();
- IssuesToMessage(issues, req->Record.MutableIssues());
+ auto req = MakeHolder<TEvDqFailure>(Issues);
Send(ExecuterId, req.Release());
}
diff --git a/ydb/core/yq/libs/actors/run_actor.cpp b/ydb/core/yq/libs/actors/run_actor.cpp
index 891b415dd4..3e40946758 100644
--- a/ydb/core/yq/libs/actors/run_actor.cpp
+++ b/ydb/core/yq/libs/actors/run_actor.cpp
@@ -681,6 +681,7 @@ private:
const bool failure = Issues.Size() > 0;
const bool finalize = failure || DqGraphIndex + 1 >= static_cast<i32>(DqGraphParams.size());
if (finalize) {
+
if (RetryNeeded) {
ResignQuery();
return;
diff --git a/ydb/library/yql/providers/dq/actors/task_controller.cpp b/ydb/library/yql/providers/dq/actors/task_controller.cpp
index 75c1923197..e206500791 100644
--- a/ydb/library/yql/providers/dq/actors/task_controller.cpp
+++ b/ydb/library/yql/providers/dq/actors/task_controller.cpp
@@ -107,7 +107,11 @@ private:
auto ydbStatusId = ev->Get()->Record.GetStatusCode();
TIssues issues = ev->Get()->GetIssues();
YQL_LOG(DEBUG) << "AbortExecution from " << ev->Sender << ":" << ydbStatusId << " " << issues.ToOneLineString();
- OnError(issues, ydbStatusId == Ydb::StatusIds::UNAVAILABLE, false); // TODO: check fallback
+ auto retry = true;
+ if (ydbStatusId == Ydb::StatusIds::BAD_REQUEST) {
+ retry = false;
+ }
+ OnError(issues, retry, false); // TODO: check fallback
}
void OnComputeActorState(NDq::TEvDqCompute::TEvState::TPtr& ev) {
@@ -139,7 +143,7 @@ private:
case NDqProto::COMPUTE_STATE_FAILURE: {
// TODO: don't convert issues to string
NYql::IssuesFromMessage(state.GetIssues(), Issues);
- OnError(Issues, false, false);
+ OnError(Issues, true, false);
break;
}
case NDqProto::COMPUTE_STATE_EXECUTING: {