Skip to content

Commit

Permalink
[yt provider] Ignore resolve errors when reading symlink attributes (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
rvu1024 authored Feb 28, 2024
1 parent d9e9dba commit 61c178c
Showing 1 changed file with 17 additions and 9 deletions.
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

0 comments on commit 61c178c

Please sign in to comment.