Skip to content

Commit d77c4f4

Browse files
authored
lower priority for tablet metrics (#28554)
1 parent 408da97 commit d77c4f4

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

ydb/core/mind/hive/hive_impl.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3145,14 +3145,19 @@ void THive::RequestPoolsInformation() {
31453145
}
31463146

31473147
ui32 THive::GetEventPriority(IEventHandle* ev) {
3148+
// lower number = higher priority
31483149
switch (ev->GetTypeRewrite()) {
3150+
// requests from viewer/healthcheck - need to be answered fast so that hive is not reported as unresponsive
31493151
case TEvHive::EvRequestHiveInfo:
31503152
case TEvHive::EvRequestHiveDomainStats:
31513153
case TEvHive::EvRequestHiveNodeStats:
31523154
case TEvHive::EvRequestHiveStorageStats:
31533155
return 10;
31543156
default:
31553157
return 50;
3158+
// update metrics - there can be a lot of these, but they have no urgency
3159+
case TEvHive::EvTabletMetrics:
3160+
return 100;
31563161
}
31573162
}
31583163

ydb/core/mind/hive/hive_ut.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5859,6 +5859,8 @@ Y_UNIT_TEST_SUITE(THiveTest) {
58595859
runtime.SendToPipe(hiveTablet, senderA, metrics.Release());
58605860
}
58615861

5862+
runtime.DispatchEvents({}, TDuration::MilliSeconds(300));
5863+
58625864
auto createTablet = MakeHolder<TEvHive::TEvCreateTablet>(testerTablet, 100500 + tablets.size(), tabletType, BINDED_CHANNELS);
58635865
ui64 newTablet = SendCreateTestTablet(runtime, hiveTablet, testerTablet, std::move(createTablet), 0, false);
58645866

0 commit comments

Comments
 (0)