aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhor911 <hor911@ydb.tech>2023-01-27 04:11:48 +0300
committerhor911 <hor911@ydb.tech>2023-01-27 04:11:48 +0300
commitc0df21eadad350aaceb26d82dd2f11384178a45f (patch)
tree2eeb9b2bdb274698ef9bc0c0f9aaf722dfc9c453
parente27dffe907df39e13f14dad26c3de47d5547f7f4 (diff)
downloadydb-c0df21eadad350aaceb26d82dd2f11384178a45f.tar.gz
Handle S3 parse errors. Make fatal transient issues as non-transient.
-rw-r--r--ydb/core/yq/libs/control_plane_storage/internal/task_ping.cpp9
-rw-r--r--ydb/library/yql/providers/s3/actors/yql_s3_read_actor.cpp9
2 files changed, 17 insertions, 1 deletions
diff --git a/ydb/core/yq/libs/control_plane_storage/internal/task_ping.cpp b/ydb/core/yq/libs/control_plane_storage/internal/task_ping.cpp
index f58fbed2474..321897d3c71 100644
--- a/ydb/core/yq/libs/control_plane_storage/internal/task_ping.cpp
+++ b/ydb/core/yq/libs/control_plane_storage/internal/task_ping.cpp
@@ -149,7 +149,14 @@ TPingTaskParams ConstructHardPingTask(
builder << " (failure rate " << retryLimiter.RetryRate << " exceeds limit of " << policy.RetryCount << ")";
}
builder << " at " << Now();
- issues->AddIssue(NYql::TIssue(builder));
+ auto issue = NYql::TIssue(builder);
+ if (transientIssues) {
+ for (auto& subIssue : *transientIssues) {
+ issue.AddSubIssue(MakeIntrusive<NYql::TIssue>(subIssue));
+ }
+ transientIssues.Clear();
+ }
+ issues->AddIssue(issue);
}
CPS_LOG_AS_D(*actorSystem, "PingTaskRequest (resign): " << (!policyFound ? " DEFAULT POLICY" : "") << (owner ? " FAILURE " : " ") << NYql::NDqProto::StatusIds_StatusCode_Name(request.status_code()) << " " << retryLimiter.RetryCount << " " << retryLimiter.RetryCounterUpdatedAt << " " << backoff);
}
diff --git a/ydb/library/yql/providers/s3/actors/yql_s3_read_actor.cpp b/ydb/library/yql/providers/s3/actors/yql_s3_read_actor.cpp
index ed28794b032..b372af05be5 100644
--- a/ydb/library/yql/providers/s3/actors/yql_s3_read_actor.cpp
+++ b/ydb/library/yql/providers/s3/actors/yql_s3_read_actor.cpp
@@ -930,6 +930,15 @@ private:
LOG_CORO_D("TS3ReadCoroImpl", "S3 read error. Path: " << Path);
} catch (const TDtorException&) {
throw;
+ } catch (const NDB::Exception& err) {
+ TStringBuilder msgBuilder;
+ msgBuilder << err.message();
+ if (err.code()) {
+ msgBuilder << " (code: " << err.code() << ")";
+ }
+ exceptIssue.SetMessage(msgBuilder);
+ fatalCode = NYql::NDqProto::StatusIds::BAD_REQUEST;
+ RetryStuff->Cancel();
} catch (const std::exception& err) {
exceptIssue.SetMessage(err.what());
fatalCode = NYql::NDqProto::StatusIds::INTERNAL_ERROR;