Skip to content

kvserver: log skipped candidates and load in lease transfer decisions#162584

Draft
tbg wants to merge 1 commit intocockroachdb:masterfrom
tbg:storerebalancer-skipped-logging
Draft

kvserver: log skipped candidates and load in lease transfer decisions#162584
tbg wants to merge 1 commit intocockroachdb:masterfrom
tbg:storerebalancer-skipped-logging

Conversation

@tbg
Copy link
Member

@tbg tbg commented Feb 6, 2026

When the store rebalancer picks a lease to transfer, it may skip over many candidates that it owns but can't move (e.g. due to constraints or lease preferences). Previously there was no visibility into this.

Add tracking of how many lease-holding candidates were considered and their cumulative load. The "transferring lease" log message now includes this information, making it easy to spot when the rebalancer is churning through many unmovable hot leases before settling on a cold one (e.g. the liveness range).

Motivated by https://github.com/cockroachlabs/support/issues/3544.

When the store rebalancer picks a lease to transfer, it may skip over
many candidates that it owns but can't move (e.g. due to constraints
or lease preferences). Previously there was no visibility into this.

Add tracking of how many lease-holding candidates were considered and
their cumulative load. The "transferring lease" log message now
includes this information, making it easy to spot when the rebalancer
is churning through many unmovable hot leases before settling on a
cold one (e.g. the liveness range).

Epic: None
Release note: None

Co-authored-by: Cursor <cursoragent@cursor.com>
@trunk-io
Copy link
Contributor

trunk-io bot commented Feb 6, 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.

@blathers-crl
Copy link

blathers-crl bot commented Feb 6, 2026

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

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.

2 participants