Skip to content

mmaintegration: add TestMakeStoreLoadMsg#164882

Merged
trunk-io[bot] merged 1 commit intocockroachdb:masterfrom
wenyihu6:regressiontest
Mar 6, 2026
Merged

mmaintegration: add TestMakeStoreLoadMsg#164882
trunk-io[bot] merged 1 commit intocockroachdb:masterfrom
wenyihu6:regressiontest

Conversation

@wenyihu6
Copy link
Copy Markdown
Contributor

@wenyihu6 wenyihu6 commented Mar 5, 2026

Epic: CRDB-55052
Release note: none

The capped multiplier model (computeCPUCapacityWithCap) subtracts
background CPU when deriving per-store capacity. This mistakenly
broke the invariant that node-level utilization can be recovered by
summing store-level values:

sum(store loads) / sum(store capacities) = NodeCPURateUsage / NodeCPURateCapacity

MakeStoreLoadMsg addresses this by populating
StoreLoadMsg.NodeCPULoad and StoreLoadMsg.NodeCPUCapacity from the
physical node values in StoreDescriptor.NodeCapacity, so that
node-level overload detection uses the correct utilization.

This commit adds TestMakeStoreLoadMsg, a regression test that
exercises the full path from StoreDescriptor through
MakeStoreLoadMsg and ProcessStoreLoadMsg into
LoadSummaryForAllStores.

@trunk-io
Copy link
Copy Markdown
Contributor

trunk-io bot commented Mar 5, 2026

😎 Merged successfully - details.

@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@wenyihu6 wenyihu6 marked this pull request as ready for review March 5, 2026 00:59
@wenyihu6 wenyihu6 requested review from a team as code owners March 5, 2026 00:59
@wenyihu6 wenyihu6 requested a review from tbg March 5, 2026 01:00
Copy link
Copy Markdown
Member

@tbg tbg left a comment

Choose a reason for hiding this comment

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

@tbg reviewed 14 files and all commit messages.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on wenyihu6).

Copy link
Copy Markdown
Member

@tbg tbg left a comment

Choose a reason for hiding this comment

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

:lgtm: & thank you!

@tbg made 1 comment.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on wenyihu6).

@wenyihu6
Copy link
Copy Markdown
Contributor Author

wenyihu6 commented Mar 5, 2026

Rebased. TFTR!

/trunk merge

@wenyihu6 wenyihu6 force-pushed the regressiontest branch 2 times, most recently from 725f293 to 0f5af46 Compare March 5, 2026 22:27
@wenyihu6
Copy link
Copy Markdown
Contributor Author

wenyihu6 commented Mar 5, 2026

/trunk merge

The capped multiplier model (`computeCPUCapacityWithCap`) subtracts
background CPU when deriving per-store capacity. This mistakenly
broke the invariant that node-level utilization can be recovered by
summing store-level values:

  sum(store loads) / sum(store capacities) = NodeCPURateUsage / NodeCPURateCapacity

`MakeStoreLoadMsg` addresses this by populating
`StoreLoadMsg.NodeCPULoad` and `StoreLoadMsg.NodeCPUCapacity` from the
physical node values in `StoreDescriptor.NodeCapacity`, so that
node-level overload detection uses the correct utilization.

This commit adds `TestMakeStoreLoadMsg`, a regression test that
exercises the full path from `StoreDescriptor` through
`MakeStoreLoadMsg` and `ProcessStoreLoadMsg` into
`LoadSummaryForAllStores`.

Release note: None
@wenyihu6
Copy link
Copy Markdown
Contributor Author

wenyihu6 commented Mar 5, 2026

/trunk merge

1 similar comment
@wenyihu6
Copy link
Copy Markdown
Contributor Author

wenyihu6 commented Mar 6, 2026

/trunk merge

@trunk-io trunk-io bot merged commit ad3451a into cockroachdb:master Mar 6, 2026
26 checks passed
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.

3 participants