diff --git a/ydb/core/mind/hive/hive_impl.cpp b/ydb/core/mind/hive/hive_impl.cpp index 3e3b98552ba9..684eebd15b23 100644 --- a/ydb/core/mind/hive/hive_impl.cpp +++ b/ydb/core/mind/hive/hive_impl.cpp @@ -3145,7 +3145,9 @@ void THive::RequestPoolsInformation() { } ui32 THive::GetEventPriority(IEventHandle* ev) { + // 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: @@ -3153,6 +3155,9 @@ ui32 THive::GetEventPriority(IEventHandle* ev) { return 10; default: return 50; + // update metrics - there can be a lot of these, but they have no urgency + case TEvHive::EvTabletMetrics: + return 100; } } diff --git a/ydb/core/mind/hive/hive_ut.cpp b/ydb/core/mind/hive/hive_ut.cpp index 3cf9b5f5e17d..5cb30732cffc 100644 --- a/ydb/core/mind/hive/hive_ut.cpp +++ b/ydb/core/mind/hive/hive_ut.cpp @@ -5857,6 +5857,8 @@ Y_UNIT_TEST_SUITE(THiveTest) { runtime.SendToPipe(hiveTablet, senderA, metrics.Release()); } + runtime.DispatchEvents({}, TDuration::MilliSeconds(300)); + auto createTablet = MakeHolder(testerTablet, 100500 + tablets.size(), tabletType, BINDED_CHANNELS); ui64 newTablet = SendCreateTestTablet(runtime, hiveTablet, testerTablet, std::move(createTablet), 0, false);