Skip to content

Conversation

@vporyadke
Copy link
Collaborator

Changelog entry

...

Changelog category

  • Not for changelog (changelog entry is not required)

Description for reviewers

...

@github-actions
Copy link

github-actions bot commented Nov 10, 2025

2025-11-10 15:48:47 UTC Pre-commit check linux-x86_64-release-asan for fa18e26 has started.
2025-11-10 15:49:04 UTC Artifacts will be uploaded here
2025-11-10 15:51:16 UTC ya make is running...
🟡 2025-11-10 17:46:34 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
15673 15162 0 178 305 28

🟢 2025-11-10 17:46:51 UTC Build successful.
🟢 2025-11-10 17:47:20 UTC ydbd size 3.8 GiB changed* by -80 Bytes, which is <= 0 Bytes vs main: OK

ydbd size dash main: 1c5d6a2 merge: fa18e26 diff diff %
ydbd size 4 080 530 280 Bytes 4 080 530 200 Bytes -80 Bytes -0.000%
ydbd stripped size 1 514 729 768 Bytes 1 514 729 704 Bytes -64 Bytes -0.000%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

@github-actions
Copy link

github-actions bot commented Nov 10, 2025

2025-11-10 15:48:48 UTC Pre-commit check linux-x86_64-relwithdebinfo for fa18e26 has started.
2025-11-10 15:49:06 UTC Artifacts will be uploaded here
2025-11-10 15:51:22 UTC ya make is running...
🟡 2025-11-10 17:21:00 UTC Some tests failed, follow the links below. Going to retry failed tests...

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
39289 36467 0 2 2792 28

2025-11-10 17:21:13 UTC ya make is running... (failed tests rerun, try 2)
🟢 2025-11-10 17:30:49 UTC Tests successful.

Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
55 (only retried tests) 38 0 0 0 17

🟢 2025-11-10 17:30:56 UTC Build successful.
🟢 2025-11-10 17:31:17 UTC ydbd size 2.3 GiB changed* by 0 Bytes, which is <= 0 Bytes vs main: OK

ydbd size dash main: 1c5d6a2 merge: fa18e26 diff diff %
ydbd size 2 437 459 536 Bytes 2 437 459 536 Bytes 0 Bytes 0.000%
ydbd stripped size 518 602 768 Bytes 518 602 768 Bytes 0 Bytes 0.000%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

@github-actions
Copy link

🟢 2025-11-10 15:50:18 UTC The validation of the Pull Request description is successful.

@vporyadke vporyadke requested a review from CyberROFL November 11, 2025 08:36
@vporyadke vporyadke marked this pull request as ready for review November 11, 2025 08:36
Copilot AI review requested due to automatic review settings November 11, 2025 08:36
@vporyadke vporyadke requested a review from a team as a code owner November 11, 2025 08:36
Copilot finished reviewing on behalf of vporyadke November 11, 2025 08:38
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR lowers the priority of tablet metrics events in the Hive system to prevent them from blocking more urgent requests like viewer/healthcheck queries. The PR addresses a performance issue where high volumes of metrics updates could make the Hive appear unresponsive.

  • Assigns a lower priority (100) to EvTabletMetrics events compared to default events (50)
  • Adds comments explaining the priority scheme
  • Updates a unit test to account for metrics processing delays

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
ydb/core/mind/hive/hive_impl.cpp Modified GetEventPriority() to assign lower priority to tablet metrics events with explanatory comments
ydb/core/mind/hive/hive_ut.cpp Added event dispatch delay in TestNotEnoughResources to allow metrics to be processed before proceeding

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 3156 to +3160
default:
return 50;
// update metrics - there can be a lot of these, but they have no urgency
case TEvHive::EvTabletMetrics:
return 100;
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.
@@ -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: может тогда в настройки унести, чтобы иметь возможность управления без перекомпиляции?

@CyberROFL
Copy link
Member

@vporyadke привяжи issue

@vporyadke vporyadke linked an issue Nov 12, 2025 that may be closed by this pull request
@vporyadke vporyadke merged commit d77c4f4 into ydb-platform:main Nov 12, 2025
19 checks passed
@vporyadke vporyadke self-assigned this Nov 12, 2025
qyryq pushed a commit to qyryq/ydb that referenced this pull request Nov 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

optimisations for writing (lots of) metrics in Hive

2 participants