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 7, 2025

2025-11-07 15:46:08 UTC Pre-commit check linux-x86_64-relwithdebinfo for 3f83c82 has started.
2025-11-07 15:46:12 UTC Artifacts will be uploaded here
2025-11-07 15:47:47 UTC ya make is running...
🟢 2025-11-07 15:57:05 UTC Tests successful.

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
179 179 0 0 0 0

🟢 2025-11-07 15:57:14 UTC Build successful.

@github-actions
Copy link

github-actions bot commented Nov 7, 2025

2025-11-07 15:46:16 UTC Pre-commit check linux-x86_64-release-asan for 3f83c82 has started.
2025-11-07 15:46:44 UTC Artifacts will be uploaded here
2025-11-07 15:48:39 UTC ya make is running...
🟢 2025-11-07 15:56:06 UTC Tests successful.

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
179 179 0 0 0 0

🟢 2025-11-07 15:56:15 UTC Build successful.

@github-actions
Copy link

github-actions bot commented Nov 7, 2025

🟢 2025-11-07 15:48:47 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
@vporyadke vporyadke requested a review from a team as a code owner November 11, 2025 08:36
Copilot AI review requested due to automatic review settings November 11, 2025 08:36
Copilot finished reviewing on behalf of vporyadke November 11, 2025 08:39
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 adds a new unit test TestReassignNonexistentTablet to verify that attempting to reassign a non-existent tablet is handled gracefully and does not block the Hive balancer.

  • Adds test for reassigning a non-existent tablet via HTTP API
  • Verifies that the invalid reassignment returns total=0 in the response
  • Ensures the balancer continues to operate normally after the invalid request

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

Comment on lines +8279 to +8286
{
THolder<TEvHive::TEvTabletMetrics> metrics = MakeHolder<TEvHive::TEvTabletMetrics>();
NKikimrHive::TTabletMetrics* metric = metrics->Record.AddTabletMetrics();
metric->SetTabletID(tablet);
metric->MutableResourceUsage()->SetNetwork(9000);

runtime.SendToPipe(hiveTablet, sender, metrics.Release());
}
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.

Inconsistent indentation: this opening brace uses 7 spaces instead of 8 spaces like the rest of the function. Should align with the opening brace on line 8254.

Suggested change
{
THolder<TEvHive::TEvTabletMetrics> metrics = MakeHolder<TEvHive::TEvTabletMetrics>();
NKikimrHive::TTabletMetrics* metric = metrics->Record.AddTabletMetrics();
metric->SetTabletID(tablet);
metric->MutableResourceUsage()->SetNetwork(9000);
runtime.SendToPipe(hiveTablet, sender, metrics.Release());
}
{
THolder<TEvHive::TEvTabletMetrics> metrics = MakeHolder<TEvHive::TEvTabletMetrics>();
NKikimrHive::TTabletMetrics* metric = metrics->Record.AddTabletMetrics();
metric->SetTabletID(tablet);
metric->MutableResourceUsage()->SetNetwork(9000);
runtime.SendToPipe(hiveTablet, sender, metrics.Release());
}

Copilot uses AI. Check for mistakes.
metric->MutableResourceUsage()->SetNetwork(9000);

runtime.SendToPipe(hiveTablet, sender, metrics.Release());
}
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.

Inconsistent indentation: this closing brace uses 7 spaces instead of 8 spaces like the rest of the function. Should align with the corresponding opening brace.

Suggested change
}
}

Copilot uses AI. Check for mistakes.
Comment on lines +8279 to +8292
{
THolder<TEvHive::TEvTabletMetrics> metrics = MakeHolder<TEvHive::TEvTabletMetrics>();
NKikimrHive::TTabletMetrics* metric = metrics->Record.AddTabletMetrics();
metric->SetTabletID(tablet);
metric->MutableResourceUsage()->SetNetwork(9000);

runtime.SendToPipe(hiveTablet, sender, metrics.Release());
}

{
TDispatchOptions options;
options.FinalEvents.push_back(NHive::TEvPrivate::EvBalancerOut);
runtime.DispatchEvents(options);
}
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.

Inconsistent indentation: this block uses 7 spaces instead of 8 spaces like the rest of the function. All lines in this block should be indented with 8 spaces to match the rest of the test function.

Suggested change
{
THolder<TEvHive::TEvTabletMetrics> metrics = MakeHolder<TEvHive::TEvTabletMetrics>();
NKikimrHive::TTabletMetrics* metric = metrics->Record.AddTabletMetrics();
metric->SetTabletID(tablet);
metric->MutableResourceUsage()->SetNetwork(9000);
runtime.SendToPipe(hiveTablet, sender, metrics.Release());
}
{
TDispatchOptions options;
options.FinalEvents.push_back(NHive::TEvPrivate::EvBalancerOut);
runtime.DispatchEvents(options);
}
{
THolder<TEvHive::TEvTabletMetrics> metrics = MakeHolder<TEvHive::TEvTabletMetrics>();
NKikimrHive::TTabletMetrics* metric = metrics->Record.AddTabletMetrics();
metric->SetTabletID(tablet);
metric->MutableResourceUsage()->SetNetwork(9000);
runtime.SendToPipe(hiveTablet, sender, metrics.Release());
}
{
TDispatchOptions options;
options.FinalEvents.push_back(NHive::TEvPrivate::EvBalancerOut);
runtime.DispatchEvents(options);
}

Copilot uses AI. Check for mistakes.
p2->SetValue("ReassignTablet");
auto* p3 = pb.AddQueryParams();
p3->SetKey("tablet");
p3->SetValue("52");
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 hardcoded tablet ID "52" could potentially collide with an existing tablet. Consider using a clearly non-existent ID similar to line 8214 (e.g., TStringBuilder() << 0xfa5e7ab1e7) or adding a comment explaining why this specific value is guaranteed to be non-existent.

Suggested change
p3->SetValue("52");
p3->SetValue(TStringBuilder() << 0xfa5e7ab1e7);

Copilot uses AI. Check for mistakes.
@CyberROFL
Copy link
Member

@vporyadke привяжи issue и свяжи с pr, в котором делалось исправление.

@vporyadke vporyadke merged commit ba8aab8 into ydb-platform:main Nov 12, 2025
19 checks passed
@vporyadke vporyadke self-assigned this Nov 12, 2025
ydbot pushed a commit that referenced this pull request Nov 13, 2025
ydbot pushed a commit that referenced this pull request Nov 13, 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.

2 participants