Skip to content
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
5 changes: 5 additions & 0 deletions ydb/core/mind/hive/hive_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3145,14 +3145,19 @@ void THive::RequestPoolsInformation() {
}

ui32 THive::GetEventPriority(IEventHandle* ev) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor: может тогда в настройки унести, чтобы иметь возможность управления без перекомпиляции?

// lower number = higher priority
switch (ev->GetTypeRewrite()) {
// requests from viewer/healthcheck - need to be answered fast so that hive is not reported as unresponsive
case TEvHive::EvRequestHiveInfo:
case TEvHive::EvRequestHiveDomainStats:
case TEvHive::EvRequestHiveNodeStats:
case TEvHive::EvRequestHiveStorageStats:
return 10;
default:
return 50;
// update metrics - there can be a lot of these, but they have no urgency
case TEvHive::EvTabletMetrics:
return 100;
Comment on lines 3156 to +3160
Copy link

Copilot AI Nov 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The case TEvHive::EvTabletMetrics: is placed after the default case, making it unreachable. This case will never execute, and tablet metrics will always receive the default priority of 50 instead of the intended 100. Move the case TEvHive::EvTabletMetrics: block before the default case.

Suggested change
default:
return 50;
// update metrics - there can be a lot of these, but they have no urgency
case TEvHive::EvTabletMetrics:
return 100;
// update metrics - there can be a lot of these, but they have no urgency
case TEvHive::EvTabletMetrics:
return 100;
default:
return 50;

Copilot uses AI. Check for mistakes.
}
}

Expand Down
2 changes: 2 additions & 0 deletions ydb/core/mind/hive/hive_ut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5857,6 +5857,8 @@ Y_UNIT_TEST_SUITE(THiveTest) {
runtime.SendToPipe(hiveTablet, senderA, metrics.Release());
}

runtime.DispatchEvents({}, TDuration::MilliSeconds(300));

auto createTablet = MakeHolder<TEvHive::TEvCreateTablet>(testerTablet, 100500 + tablets.size(), tabletType, BINDED_CHANNELS);
ui64 newTablet = SendCreateTestTablet(runtime, hiveTablet, testerTablet, std::move(createTablet), 0, false);

Expand Down
Loading