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

Do not pass ParticipantNodes via protobuf for local event. #13780

Merged
merged 1 commit into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
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
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
Loading