-
Notifications
You must be signed in to change notification settings - Fork 707
cluster/tp_frontend: fix per partition dead node list output #29132
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
base: dev
Are you sure you want to change the base?
Conversation
This list is supposed to contain the list of dead nodes that are relevant to a particular partition, instead it just returns the original list. For example test/0 has replicas [1, 3, 5, 7] and [5, 7, 8] are dead nodes, this method now returns [5, 7] instead of [5, 7, 8] since only the former is the relevant set of replicas for this partition. Additionally sorts the replica/node lists for easy visual comparison.
There was a problem hiding this 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 fixes a bug where the per-partition dead node list was incorrectly returning all dead nodes in the cluster instead of only the dead nodes that are replicas of the specific partition. For example, if partition test/0 has replicas [1, 3, 5, 7] and cluster-wide dead nodes are [5, 7, 8], the method now correctly returns [5, 7] instead of [5, 7, 8].
Key changes:
- Extract only dead nodes that are actual replicas of the partition being evaluated
- Sort replica lists for consistent output ordering
Retry command for Build#78463please wait until all jobs are finished before running the slash command |
CI test resultstest results on build#78463 |
|
The failures seem related. I think I know why, but I need a bit more time to think it through...please hold off on reviewing until I fix it. |
| std::ranges::find(dead_nodes, replica.node_id) | ||
| != dead_nodes.end()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: use std::ranges::contains
| const auto& current = assignment.replicas; | ||
| auto current = assignment.replicas; | ||
| // sort for a consistent final output ordering. | ||
| std::ranges::sort(current, [](const auto& a, const auto& b) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
can we kick the sort to after the quorum loss determination?
We only need a sorted copy of assignment.replicas if theres quorum loss.
This list is supposed to contain the list of dead nodes that are relevant to a particular partition, instead it just returns the original list.
For example test/0 has replicas [1, 3, 5, 7] and [5, 7, 8] are dead nodes, this method now returns [5, 7] instead of [5, 7, 8] since only the former is the relevant set of replicas for this partition.
Additionally sorts the replica/node lists for easy visual comparison.
Fixes: https://redpandadata.atlassian.net/browse/INC-1044
Backports Required
Release Notes