Skip to content

Account GroupSizeInUnits in TGroupFitter #19337

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jun 23, 2025

Conversation

rosik
Copy link
Collaborator

@rosik rosik commented Jun 5, 2025

Changelog entry

Changelog category

  • New feature

Description for reviewers

This PR includes the following changes:

  • TGroupFitter accounts GroupSizeInUnits when creating new groups or sanitizing existing ones
  • VDisk.PDiskParams now reports OwnerWeigt and SlotSizeInUnits
  • NodeWhiteboard now reports corresponding new properties of pdisk, vdisk and bsgroup, it's tested
  • TGroupMapperTest is updated to account new NumSlots calculation logics and cover new cases

@rosik rosik self-assigned this Jun 5, 2025
@rosik rosik requested a review from a team as a code owner June 5, 2025 08:21
@rosik rosik requested a review from the-ancient-1 June 5, 2025 08:21
Copy link

github-actions bot commented Jun 5, 2025

🟢 2025-06-19 09:05:47 UTC The validation of the Pull Request description is successful.

@rosik rosik changed the title Account GroupSizeUnits in TGroupFitter Account GroupSizeInUnits in TGroupFitter Jun 5, 2025
adameat
adameat previously approved these changes Jun 5, 2025
@the-ancient-1 the-ancient-1 requested a review from Copilot June 6, 2025 20:05
Copilot

This comment was marked as outdated.

@rosik rosik force-pushed the size-in-units-mvp-4 branch from 685cc2f to f952e1f Compare June 9, 2025 17:42
@rosik rosik force-pushed the size-in-units-mvp-4 branch 2 times, most recently from 9378599 to a55b92b Compare June 17, 2025 12:50
@rosik rosik requested review from kruall and Copilot June 17, 2025 12:55
Copy link
Contributor

@Copilot 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 introduces new distributed storage parameters—GroupSizeInUnits and SlotSizeInUnits—in multiple components of the system. Key changes include:

  • Updates to proto, whiteboard, and VDisk state reporting to propagate the new unit sizes.
  • Adjustments to group allocation and sanitization functions to accept and apply the new GroupSizeInUnits parameter.
  • Updates to unit tests and PDisk components ensuring that group size accounting is integrated throughout.

Reviewed Changes

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

Show a summary per file
File Description
ydb/core/protos/node_whiteboard.proto Added new fields SlotSizeInUnits and GroupSizeInUnits to PVdisk and BSGroup messages for whiteboard reporting.
ydb/core/node_whiteboard/node_whiteboard.h Updated TEvVDiskStateUpdate constructor to include groupSizeInUnits in whiteboard updates.
ydb/core/mind/bscontroller/* Modified AllocateGroup, FindMisplacedVDisks, and related APIs to include the new groupSizeInUnits parameter.
ydb/core/mind/bscontroller/group_mapper_ut.cpp Updated test cases to pass appropriate groupSizeInUnits values.
ydb/core/blobstorage/* and ydb/core/blobstorage/pdisk/* Propagated the new parameters through PDisk parameter initialization, mock state, and reporting.
ydb/core/blobstorage/nodewarden/* Updated VDisk state reporting to include GroupSizeInUnits.
ydb/core/blobstorage/distconf_generate.cpp Adjusted group allocation calls to pass an explicit groupSizeInUnits value.
Comments suppressed due to low confidence (1)

ydb/core/mind/bscontroller/group_mapper.h:102

  • Consider updating the function documentation and comments to clearly explain the purpose and expected values for the new 'groupSizeInUnits' parameter in the API.
            bool AllocateGroup(ui32 groupId, TGroupDefinition& group, TGroupMapper::TGroupConstraintsDefinition& constraints,

@ydb-platform ydb-platform deleted a comment from github-actions bot Jun 17, 2025
@ydb-platform ydb-platform deleted a comment from github-actions bot Jun 17, 2025
@ydb-platform ydb-platform deleted a comment from github-actions bot Jun 17, 2025
@ydb-platform ydb-platform deleted a comment from github-actions bot Jun 17, 2025
@ydb-platform ydb-platform deleted a comment from github-actions bot Jun 17, 2025
@ydb-platform ydb-platform deleted a comment from github-actions bot Jun 17, 2025
@ydb-platform ydb-platform deleted a comment from github-actions bot Jun 17, 2025
@rosik rosik added the rebase-and-check Rebase PR with the current base branch and check label Jun 18, 2025
@github-actions github-actions bot removed the rebase-and-check Rebase PR with the current base branch and check label Jun 18, 2025
@rosik rosik force-pushed the size-in-units-mvp-4 branch from a55b92b to 95e3182 Compare June 18, 2025 14:04
Copy link

github-actions bot commented Jun 18, 2025

2025-06-18 14:09:46 UTC Pre-commit check linux-x86_64-relwithdebinfo for ecd0318 has started.
2025-06-18 14:10:14 UTC Artifacts will be uploaded here
2025-06-18 14:14:29 UTC ya make is running...
🟡 2025-06-18 16:01:15 UTC Some tests failed, follow the links below. Going to retry failed tests...

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
38158 35443 0 5 2662 48

2025-06-18 16:04:45 UTC ya make is running... (failed tests rerun, try 2)
🟢 2025-06-18 16:16:02 UTC Tests successful.

Test history | Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
360 (only retried tests) 333 0 0 3 24

🟢 2025-06-18 16:16:10 UTC Build successful.
🟡 2025-06-18 16:16:32 UTC ydbd size 2.2 GiB changed* by +140.5 KiB, which is >= 100.0 KiB vs main: Warning

ydbd size dash main: 38bd366 merge: ecd0318 diff diff %
ydbd size 2 373 172 192 Bytes 2 373 316 032 Bytes +140.5 KiB +0.006%
ydbd stripped size 497 552 456 Bytes 497 591 304 Bytes +37.9 KiB +0.008%

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

Copy link

github-actions bot commented Jun 18, 2025

2025-06-18 14:09:52 UTC Pre-commit check linux-x86_64-release-asan for ecd0318 has started.
2025-06-18 14:09:56 UTC Artifacts will be uploaded here
2025-06-18 14:13:37 UTC ya make is running...
🟡 2025-06-18 16:29:32 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet Going to retry failed tests...

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
15892 15626 0 97 145 24

2025-06-18 16:30:55 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-06-18 17:03:11 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet Going to retry failed tests...

Test history | Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
1699 (only retried tests) 1488 0 58 132 21

2025-06-18 17:03:29 UTC ya make is running... (failed tests rerun, try 3)
🟡 2025-06-18 17:35:28 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet

Test history | Ya make output | Test bloat | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
1476 (only retried tests) 1322 0 51 80 23

🟢 2025-06-18 17:35:43 UTC Build successful.
🟢 2025-06-18 17:36:16 UTC ydbd size 3.9 GiB changed* by +22.7 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: 0808af4 merge: ecd0318 diff diff %
ydbd size 4 174 298 976 Bytes 4 174 322 248 Bytes +22.7 KiB +0.001%
ydbd stripped size 1 447 457 720 Bytes 1 447 467 416 Bytes +9.5 KiB +0.001%

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

@ydb-platform ydb-platform deleted a comment from github-actions bot Jun 18, 2025
@ydb-platform ydb-platform deleted a comment from github-actions bot Jun 18, 2025
@ydb-platform ydb-platform deleted a comment from github-actions bot Jun 18, 2025
@ydb-platform ydb-platform deleted a comment from github-actions bot Jun 18, 2025
@rosik rosik enabled auto-merge (squash) June 19, 2025 09:02
@rosik rosik requested a review from adameat June 23, 2025 10:54
@rosik rosik merged commit 0d2a2f7 into ydb-platform:main Jun 23, 2025
14 checks passed
@rosik rosik deleted the size-in-units-mvp-4 branch June 23, 2025 10:58
rosik added a commit that referenced this pull request Aug 13, 2025
Besides counters this PR includes 2 other minor changes:

- Fix squeezed tablet counters in Developer UI html
- Remove redundant OwnerWeight from YardInitResult
    During VDisk initialization PDisk replies to Skeleton with TYardInitResult event containing TPDiskParams and Skeleton saves it in its context. In #19337 it was extended with SlotSizeInUnits and OwnerWeight field. Now OwnerWeight is removed from there for two reasons. It's actually isn't used anywhere but in html rendering. And, what is more important, OwnerWeight can be changed with ChangeGroupSizeInUnits command, but PDiskParams in skeleton context is a constant field.
PavelEfarinov pushed a commit to PavelEfarinov/ydb that referenced this pull request Aug 18, 2025
Besides counters this PR includes 2 other minor changes:

- Fix squeezed tablet counters in Developer UI html
- Remove redundant OwnerWeight from YardInitResult
    During VDisk initialization PDisk replies to Skeleton with TYardInitResult event containing TPDiskParams and Skeleton saves it in its context. In ydb-platform#19337 it was extended with SlotSizeInUnits and OwnerWeight field. Now OwnerWeight is removed from there for two reasons. It's actually isn't used anywhere but in html rendering. And, what is more important, OwnerWeight can be changed with ChangeGroupSizeInUnits command, but PDiskParams in skeleton context is a constant field.
PavelEfarinov pushed a commit to PavelEfarinov/ydb that referenced this pull request Aug 18, 2025
Besides counters this PR includes 2 other minor changes:

- Fix squeezed tablet counters in Developer UI html
- Remove redundant OwnerWeight from YardInitResult
    During VDisk initialization PDisk replies to Skeleton with TYardInitResult event containing TPDiskParams and Skeleton saves it in its context. In ydb-platform#19337 it was extended with SlotSizeInUnits and OwnerWeight field. Now OwnerWeight is removed from there for two reasons. It's actually isn't used anywhere but in html rendering. And, what is more important, OwnerWeight can be changed with ChangeGroupSizeInUnits command, but PDiskParams in skeleton context is a constant field.
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.

MVP support pdisks of different sizes
3 participants