Skip to content

Commit

Permalink
Do not pass ParticipantNodes via protobuf for local event.
Browse files Browse the repository at this point in the history
  • Loading branch information
dcherednik committed Jan 23, 2025
1 parent bd79c91 commit 73b3112
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 10 deletions.
2 changes: 2 additions & 0 deletions ydb/core/kqp/executer_actor/kqp_executer.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ struct TEvKqpExecuter {
ui64 ResultRowsCount = 0;
ui64 ResultRowsBytes = 0;

THashSet<ui32> ParticipantNodes;

enum class EExecutionType {
Data,
Scan,
Expand Down
6 changes: 2 additions & 4 deletions ydb/core/kqp/executer_actor/kqp_executer_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -1897,6 +1897,8 @@ class TKqpExecuterBase : public TActor<TDerived> {
void PassAway() override {
YQL_ENSURE(AlreadyReplied && ResponseEv);

ResponseEv->ParticipantNodes = std::move(ParticipantNodes);

// Fill response stats
{
auto& response = *ResponseEv->Record.MutableResponse();
Expand All @@ -1923,10 +1925,6 @@ class TKqpExecuterBase : public TActor<TDerived> {
LOG_I("Full stats: " << response.GetResult().GetStats());
}
}

for (const auto nodeId : ParticipantNodes) {
response.MutableResult()->AddParticipantNodes(nodeId);
}
}

Request.Transactions.crop(0);
Expand Down
2 changes: 1 addition & 1 deletion ydb/core/kqp/session_actor/kqp_query_state.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ class TKqpQueryState : public TNonCopyable {
ui32 StatementResultSize = 0;

TMaybe<TString> CommandTagName;
THashSet<uint32_t> ParticipantNodes;
THashSet<ui32> ParticipantNodes;

bool IsLocalExecution(ui32 nodeId) const {
if (RequestEv->GetRequestCtx() == nullptr) {
Expand Down
6 changes: 2 additions & 4 deletions ydb/core/kqp/session_actor/kqp_session_actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1554,10 +1554,8 @@ class TKqpSessionActor : public TActorBootstrapped<TKqpSessionActor> {
QueryState->QueryStats.Executions.back().Swap(executerResults.MutableStats());
}

if (executerResults.ParticipantNodesSize()) {
for (auto nodeId : executerResults.GetParticipantNodes()) {
QueryState->ParticipantNodes.emplace(nodeId);
}
for (auto nodeId : ev->ParticipantNodes) {
QueryState->ParticipantNodes.emplace(nodeId);
}

if (response->GetStatus() != Ydb::StatusIds::SUCCESS) {
Expand Down
1 change: 0 additions & 1 deletion ydb/core/protos/kqp.proto
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,6 @@ message TExecuterTxResult {
reserved 5; // (deprecated) Stats
optional NYql.NDqProto.TDqExecutionStats Stats = 6;
reserved 7;
repeated uint32 ParticipantNodes = 8;
};

message TExecuterTxResponse {
Expand Down

0 comments on commit 73b3112

Please sign in to comment.