Skip to content

Commit e52c632

Browse files
committed
fix
1 parent bd9579b commit e52c632

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

ydb/library/yql/providers/config/yql_config_provider.cpp

+12-11
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ namespace {
168168
for (auto& arg: flag.GetArgs()) {
169169
args.push_back(arg);
170170
}
171-
if (!ApplyFlag(pos, flag.GetName(), args, ctx)) {
171+
if (!ApplyFlag(pos, flag.GetName(), args, ctx, 0)) {
172172
return false;
173173
}
174174
}
@@ -276,7 +276,7 @@ namespace {
276276
return res;
277277
}
278278

279-
if (!ApplyFlag(ctx.GetPosition(node->Child(2)->Pos()), command, args, ctx)) {
279+
if (!ApplyFlag(ctx.GetPosition(node->Child(2)->Pos()), command, args, ctx, node->UniqueId())) {
280280
return {};
281281
}
282282

@@ -479,7 +479,7 @@ namespace {
479479
return true;
480480
}
481481

482-
if (!PendingEvaluationFiles.insert(TString(node.Child(3)->Content())).second) {
482+
if (!PendingEvaluationFiles.insert({TString(node.Child(3)->Content()), node.UniqueId()}).second) {
483483
ctx.AddError(TIssue(ctx.GetPosition(node.Pos()), TStringBuilder() << "Detected evaluation cycle for file: " << node.Child(3)->Content()));
484484
return false;
485485
}
@@ -490,7 +490,8 @@ namespace {
490490
}
491491
}
492492

493-
bool ApplyFlag(const TPosition& pos, const TStringBuf name, const TVector<TStringBuf>& args, TExprContext& ctx) {
493+
bool ApplyFlag(const TPosition& pos, const TStringBuf name, const TVector<TStringBuf>& args, TExprContext& ctx,
494+
ui64 nodeUniqueId) {
494495
if (!IsSettingAllowed(pos, name, ctx)) {
495496
return false;
496497
}
@@ -504,15 +505,15 @@ namespace {
504505
return false;
505506
}
506507
} else if (name == "AddFileByUrl") {
507-
if (!AddFileByUrl(pos, args, ctx)) {
508+
if (!AddFileByUrl(pos, args, ctx, nodeUniqueId)) {
508509
return false;
509510
}
510511
} else if (name == "SetFileOption") {
511512
if (!SetFileOption(pos, args, ctx)) {
512513
return false;
513514
}
514515
} else if (name == "AddFolderByUrl") {
515-
if (!AddFolderByUrl(pos, args, ctx)) {
516+
if (!AddFolderByUrl(pos, args, ctx, nodeUniqueId)) {
516517
return false;
517518
}
518519
} else if (name == "SetPackageVersion") {
@@ -1015,13 +1016,13 @@ namespace {
10151016
return true;
10161017
}
10171018

1018-
bool AddFileByUrl(const TPosition& pos, const TVector<TStringBuf>& args, TExprContext& ctx) {
1019+
bool AddFileByUrl(const TPosition& pos, const TVector<TStringBuf>& args, TExprContext& ctx, ui64 nodeUniqueId) {
10191020
if (args.size() < 2 || args.size() > 3) {
10201021
ctx.AddError(TIssue(pos, TStringBuilder() << "Expected 2 or 3 arguments, but got " << args.size()));
10211022
return false;
10221023
}
10231024

1024-
PendingEvaluationFiles.erase(TString(args[0]));
1025+
PendingEvaluationFiles.erase({TString(args[0]),nodeUniqueId});
10251026
TStringBuf token = args.size() == 3 ? args[2] : TStringBuf();
10261027
if (token) {
10271028
if (auto cred = Types.Credentials->FindCredential(token)) {
@@ -1135,13 +1136,13 @@ namespace {
11351136
return url;
11361137
}
11371138

1138-
bool AddFolderByUrl(const TPosition& pos, const TVector<TStringBuf>& args, TExprContext& ctx) {
1139+
bool AddFolderByUrl(const TPosition& pos, const TVector<TStringBuf>& args, TExprContext& ctx, ui64 nodeUniqueId) {
11391140
if (args.size() < 2 || args.size() > 3) {
11401141
ctx.AddError(TIssue(pos, TStringBuilder() << "Expected 2 or 3 arguments, but got " << args.size()));
11411142
return false;
11421143
}
11431144

1144-
PendingEvaluationFiles.erase(TString(args[0]));
1145+
PendingEvaluationFiles.erase({TString(args[0]),nodeUniqueId});
11451146
TStringBuf token = args.size() == 3 ? args[2] : TStringBuf();
11461147
if (token) {
11471148
if (auto cred = Types.Credentials->FindCredential(token)) {
@@ -1238,7 +1239,7 @@ namespace {
12381239
TString Username;
12391240
const TAllowSettingPolicy Policy;
12401241
TOperationStatistics Statistics;
1241-
THashSet<TString> PendingEvaluationFiles;
1242+
THashSet<std::pair<TString, ui64>> PendingEvaluationFiles;
12421243
};
12431244
}
12441245

0 commit comments

Comments
 (0)