Skip to content

allocator/mmaprototype: add test for non-voter WB rebalancing#166148

Draft
tbg wants to merge 1 commit intocockroachdb:masterfrom
tbg:tbg/mma-nonvoter-wb-rebalance-test
Draft

allocator/mmaprototype: add test for non-voter WB rebalancing#166148
tbg wants to merge 1 commit intocockroachdb:masterfrom
tbg:tbg/mma-nonvoter-wb-rebalance-test

Conversation

@tbg
Copy link
Member

@tbg tbg commented Mar 19, 2026

Summary

  • Adds a TestClusterState datadriven test verifying that MMA rebalances
    NON_VOTER replicas across stores to address WriteBandwidth imbalance,
    even when the leaseholder is in a different region.
  • Scenario: voters constrained to Region A (via voter_constraints),
    non-voters placed in Region B, with a WB imbalance among the Region B
    stores. The leaseholder in Region A detects the remote overload and
    moves the non-voter, preserving the NON_VOTER type.
  • This scenario had no prior test coverage.

Epic: CRDB-56265

Add a TestClusterState datadriven test that verifies MMA rebalances
NON_VOTER replicas across stores to address WriteBandwidth imbalance,
even when the leaseholder is in a different region. This scenario was
previously untested: voters constrained to Region A, non-voters in
Region B, with a WB imbalance among the Region B stores.

The test confirms the leaseholder in Region A detects the remote WB
overload and moves the non-voter from the overloaded store to the
underloaded store, preserving the NON_VOTER replica type.

Co-Authored-By: roachdev-claude <roachdev-claude-bot@cockroachlabs.com>
@trunk-io
Copy link
Contributor

trunk-io bot commented Mar 19, 2026

Merging to master in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link

@themavik themavik left a comment

Choose a reason for hiding this comment

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

Reviewed the changes — the implementation is clean and addresses the reported issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants