Skip to content

MINOR: Relax conditions to reduce rebalances with the classic consumer#22705

Closed
ezhou413 wants to merge 1 commit into
apache:trunkfrom
ezhou413:reduce-rack-rebalance-churn-isempty
Closed

MINOR: Relax conditions to reduce rebalances with the classic consumer#22705
ezhou413 wants to merge 1 commit into
apache:trunkfrom
ezhou413:reduce-rack-rebalance-churn-isempty

Conversation

@ezhou413

@ezhou413 ezhou413 commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Delete this text and replace it with a detailed description of your
change. The PR title and body will become the squashed commit message.

If you would like to tag individuals, add some commentary, upload
images, or include other supplemental information that should not be
part of the eventual commit message, please use a separate comment.

If applicable, please include a summary of the testing strategy
(including rationale) for the proposed change. Unit and/or integration
tests are expected for any behavior change and system tests should be
considered for larger changes.

Reviewers: Lianet Magrans lmagrans@confluent.io

@github-actions github-actions Bot added triage PRs from the community consumer clients small Small PRs labels Jun 29, 2026
@lianetm lianetm added ci-approved and removed triage PRs from the community labels Jul 6, 2026
Comment on lines +1680 to +1681
private final Set<String> knownRacks;
private final boolean hasUnknownReplica;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

is a boolean enough or do we need to know the nodes that are down? E.g, what about there is a rack change (need to rebalance), at the same time that a replica is down?

Seems safer to be explicit about what we will tolerate and not rebalance. We have "known replicas" (with their racks, like the line above but wonder if we need to track a Map<replicaId, rack> instead), and "unknown replicas" (replicaIds that are down, have no host/rack). Then we can only safely tolerate a rack missing in one of them but present in the other for the same replica ID (that would be exactly the condition we want and nothing more: a replica X that either has the same racks it had before, or it's down). Makes sense?

@ezhou413

ezhou413 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

Fixed in #22768

@ezhou413 ezhou413 closed this Jul 8, 2026
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