Skip to content

Commit 8d08b99

Browse files
authored
Don't pass expired failure injections to the child process (#17004)
1 parent cbbff2d commit 8d08b99

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

ydb/library/yql/providers/dq/task_runner/tasks_runner_pipe.cpp

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ class TInputChannel : public IInputChannel {
585585
if (protocolVersion <= 1) {
586586
return std::numeric_limits<i64>::max();
587587
}
588-
588+
589589
if (protocolVersion < 6) {
590590
NDqProto::TCommandHeader header;
591591
header.SetVersion(2);
@@ -614,7 +614,7 @@ class TInputChannel : public IInputChannel {
614614
header.SetChannelId(ChannelId);
615615
header.Save(&Output);
616616

617-
i64 written = 0;
617+
i64 written = 0;
618618
TCountingOutput countingOutput(&Output);
619619
data.Proto.Save(&countingOutput);
620620
if (data.IsOOB()) {
@@ -1175,7 +1175,7 @@ class TDqSink : public IDqAsyncOutputBuffer {
11751175
const TDqOutputStats& GetPushStats() const override {
11761176
return PushStats;
11771177
}
1178-
1178+
11791179
const TDqAsyncOutputBufferStats& GetPopStats() const override {
11801180
return PopStats;
11811181
}
@@ -1386,15 +1386,17 @@ class TTaskRunner: public IPipeTaskRunner {
13861386

13871387
auto state = TFailureInjector::GetCurrentState();
13881388
for (auto& [k, v]: state) {
1389-
NDqProto::TCommandHeader header;
1390-
header.SetVersion(1);
1391-
header.SetCommand(NDqProto::TCommandHeader::CONFIGURE_FAILURE_INJECTOR);
1392-
header.Save(&Output);
1393-
NYql::NDqProto::TConfigureFailureInjectorRequest request;
1394-
request.SetName(k);
1395-
request.SetSkip(v.Skip);
1396-
request.SetFail(v.CountOfFails);
1397-
request.Save(&Output);
1389+
if (v.CountOfFails) {
1390+
NDqProto::TCommandHeader header;
1391+
header.SetVersion(1);
1392+
header.SetCommand(NDqProto::TCommandHeader::CONFIGURE_FAILURE_INJECTOR);
1393+
header.Save(&Output);
1394+
NYql::NDqProto::TConfigureFailureInjectorRequest request;
1395+
request.SetName(k);
1396+
request.SetSkip(v.Skip);
1397+
request.SetFail(v.CountOfFails);
1398+
request.Save(&Output);
1399+
}
13981400
}
13991401

14001402
return ret;
@@ -1542,7 +1544,7 @@ class TTaskRunner: public IPipeTaskRunner {
15421544

15431545
{
15441546
auto guard = BindAllocator({});
1545-
ProgramNode = DeserializeRuntimeNode(Task.GetProgram().GetRaw(), GetTypeEnv());
1547+
ProgramNode = DeserializeRuntimeNode(Task.GetProgram().GetRaw(), GetTypeEnv());
15461548
}
15471549

15481550
auto& programStruct = static_cast<TStructLiteral&>(*ProgramNode.GetNode());

0 commit comments

Comments
 (0)