Skip to content

YQ-4091 Delete public metrics if automatic query (#14288) / to stable #14308

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

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
4 changes: 1 addition & 3 deletions ydb/core/fq/libs/actors/pending_fetcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -481,9 +481,7 @@ class TPendingFetcher : public NActors::TActorBootstrapped<TPendingFetcher> {
: Register(CreateRunActor(SelfId(), queryCounters, std::move(params)));

RunActorMap[runActorId] = TRunActorInfo { .QueryId = queryId, .QueryName = task.query_name() };
if (!task.automatic()) {
CountersMap[queryId] = { rootCountersParent, publicCountersParent, runActorId };
}
CountersMap[queryId] = { rootCountersParent, publicCountersParent, runActorId };
}

NActors::IActor* CreateYdbRunActor(TRunActorParams&& params, const ::NYql::NCommon::TServiceCounters& queryCounters) const {
Expand Down
13 changes: 11 additions & 2 deletions ydb/core/fq/libs/row_dispatcher/coordinator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ struct TEvPrivate {
class TActorCoordinator : public TActorBootstrapped<TActorCoordinator> {

const ui64 PrintStatePeriodSec = 300;
const ui64 PrintStateToLogSplitSize = 64000;

struct TTopicKey {
TString Endpoint;
Expand Down Expand Up @@ -219,6 +220,7 @@ class TActorCoordinator : public TActorBootstrapped<TActorCoordinator> {
bool ComputeCoordinatorRequest(TActorId readActorId, const TCoordinatorRequest& request);
void UpdatePendingReadActors();
void UpdateInterconnectSessions(const NActors::TActorId& interconnectSession);
TString GetInternalState();
};

TActorCoordinator::TActorCoordinator(
Expand Down Expand Up @@ -296,7 +298,7 @@ void TActorCoordinator::Handle(NActors::TEvents::TEvPing::TPtr& ev) {
Send(ev->Sender, new NActors::TEvents::TEvPong(), IEventHandle::FlagTrackDelivery);
}

void TActorCoordinator::PrintInternalState() {
TString TActorCoordinator::GetInternalState() {
TStringStream str;
str << "Known row dispatchers:\n";

Expand All @@ -313,8 +315,15 @@ void TActorCoordinator::PrintInternalState() {
for (const auto& [topic, topicInfo] : TopicsInfo) {
str << " " << topic.TopicName << " (" << topic.Endpoint << "), pending partitions: " << topicInfo.PendingPartitions.size() << "\n";
}
return str.Str();
}

LOG_ROW_DISPATCHER_DEBUG(str.Str());
void TActorCoordinator::PrintInternalState() {
auto str = GetInternalState();
auto buf = TStringBuf(str);
for (ui64 offset = 0; offset < buf.size(); offset += PrintStateToLogSplitSize) {
LOG_ROW_DISPATCHER_DEBUG(buf.SubString(offset, PrintStateToLogSplitSize));
}
}

void TActorCoordinator::HandleConnected(TEvInterconnect::TEvNodeConnected::TPtr& ev) {
Expand Down
Loading