Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[yt provider] Ignore resolve errors when reading symlink attributes #2319

Merged
merged 1 commit into from
Feb 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 17 additions & 9 deletions ydb/library/yql/providers/yt/gateway/native/yql_yt_native.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2383,15 +2383,23 @@ class TYtNativeGateway : public IYtGateway {
);
for (auto& idx: idxs) {
batchRes.push_back(batchGet->Get(tables[idx.first].Table() + "&/@", getOpts).Apply([idx, &attributes](const TFuture<NYT::TNode>& f) {
NYT::TNode attrs = f.GetValue();
if (GetTypeFromAttributes(attrs, false) == "link") {
// override some attributes by the link ones
if (attrs.HasKey(QB2Premapper)) {
attributes[idx.first][QB2Premapper] = attrs[QB2Premapper];
try {
NYT::TNode attrs = f.GetValue();
if (GetTypeFromAttributes(attrs, false) == "link") {
// override some attributes by the link ones
if (attrs.HasKey(QB2Premapper)) {
attributes[idx.first][QB2Premapper] = attrs[QB2Premapper];
}
if (attrs.HasKey(YqlRowSpecAttribute)) {
attributes[idx.first][YqlRowSpecAttribute] = attrs[YqlRowSpecAttribute];
}
}
if (attrs.HasKey(YqlRowSpecAttribute)) {
attributes[idx.first][YqlRowSpecAttribute] = attrs[YqlRowSpecAttribute];
} catch (const TErrorResponse& e) {
// Yt returns NoSuchTransaction as inner issue for ResolveError
if (!e.IsResolveError() || e.IsNoSuchTransaction()) {
throw;
}
// Just ignore. Original table path may be deleted at this time
}
}));
}
Expand Down Expand Up @@ -2695,7 +2703,7 @@ class TYtNativeGateway : public IYtGateway {
}

TString type;
NYT::TNode rowSpec;
NYT::TNode rowSpec;
if (execCtx->Options_.FillSettings().Format == IDataProvider::EResultFormat::Skiff) {
auto ytType = ParseYTType(pull.Input().Ref(), ctx, execCtx, columns);

Expand Down Expand Up @@ -2970,7 +2978,7 @@ class TYtNativeGateway : public IYtGateway {
return ExecCalc(lambda, extraUsage, tmpTablePath, execCtx, {},
TSkiffExprResultFactory(execCtx->Options_.FillSettings().RowsLimitPerWrite,
execCtx->Options_.FillSettings().AllResultsBytesLimit,
hasListResult,
hasListResult,
rowSpec,
execCtx->Options_.OptLLVM()),
&columns,
Expand Down
Loading