Skip to content

Commit fdf539d

Browse files
authored
YQ-4091 Delete public metrics if automatic query (#14288) / to stable (#14308)
1 parent 11a2631 commit fdf539d

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

ydb/core/fq/libs/actors/pending_fetcher.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -481,9 +481,7 @@ class TPendingFetcher : public NActors::TActorBootstrapped<TPendingFetcher> {
481481
: Register(CreateRunActor(SelfId(), queryCounters, std::move(params)));
482482

483483
RunActorMap[runActorId] = TRunActorInfo { .QueryId = queryId, .QueryName = task.query_name() };
484-
if (!task.automatic()) {
485-
CountersMap[queryId] = { rootCountersParent, publicCountersParent, runActorId };
486-
}
484+
CountersMap[queryId] = { rootCountersParent, publicCountersParent, runActorId };
487485
}
488486

489487
NActors::IActor* CreateYdbRunActor(TRunActorParams&& params, const ::NYql::NCommon::TServiceCounters& queryCounters) const {

ydb/core/fq/libs/row_dispatcher/coordinator.cpp

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ struct TEvPrivate {
5151
class TActorCoordinator : public TActorBootstrapped<TActorCoordinator> {
5252

5353
const ui64 PrintStatePeriodSec = 300;
54+
const ui64 PrintStateToLogSplitSize = 64000;
5455

5556
struct TTopicKey {
5657
TString Endpoint;
@@ -219,6 +220,7 @@ class TActorCoordinator : public TActorBootstrapped<TActorCoordinator> {
219220
bool ComputeCoordinatorRequest(TActorId readActorId, const TCoordinatorRequest& request);
220221
void UpdatePendingReadActors();
221222
void UpdateInterconnectSessions(const NActors::TActorId& interconnectSession);
223+
TString GetInternalState();
222224
};
223225

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

299-
void TActorCoordinator::PrintInternalState() {
301+
TString TActorCoordinator::GetInternalState() {
300302
TStringStream str;
301303
str << "Known row dispatchers:\n";
302304

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

317-
LOG_ROW_DISPATCHER_DEBUG(str.Str());
321+
void TActorCoordinator::PrintInternalState() {
322+
auto str = GetInternalState();
323+
auto buf = TStringBuf(str);
324+
for (ui64 offset = 0; offset < buf.size(); offset += PrintStateToLogSplitSize) {
325+
LOG_ROW_DISPATCHER_DEBUG(buf.SubString(offset, PrintStateToLogSplitSize));
326+
}
318327
}
319328

320329
void TActorCoordinator::HandleConnected(TEvInterconnect::TEvNodeConnected::TPtr& ev) {

0 commit comments

Comments
 (0)