Skip to content

Conversation

@CalvinConfluent
Copy link
Contributor

@CalvinConfluent CalvinConfluent commented Oct 16, 2025

The partitionChangeBuilder in handleAssignReplicasToDirs does not check
ELR. This can cause the partition clear ELR unexpectedly.

@github-actions github-actions bot added triage PRs from the community kraft small Small PRs labels Oct 16, 2025
Copy link
Contributor

@junrao junrao left a comment

Choose a reason for hiding this comment

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

@CalvinConfluent : Thanks for the PR. Do we need to add a test to cover this issue?

@github-actions github-actions bot removed the triage PRs from the community label Oct 17, 2025
@chia7712
Copy link
Member

@CalvinConfluent thanks for the patch. Quick unrelated question about handleAssignReplicasToDirs: Should the election type depend on unclean.leader.election.enable here? If all ISRs are in offline directies, users would likely expect an unclean election to bring the partition back.

@github-actions github-actions bot removed the small Small PRs label Nov 21, 2025
@CalvinConfluent
Copy link
Contributor Author

@chia7712 I think we already did. The election type is set in generateLeaderAndIsrUpdates
https://github.com/apache/kafka/blob/trunk/metadata/src/main/java/org/apache/kafka/controller/ReplicationControlManager.java#L2028

Copy link
Contributor

@artemlivshits artemlivshits left a comment

Choose a reason for hiding this comment

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

LGTM

@CalvinConfluent
Copy link
Contributor Author

CalvinConfluent commented Nov 25, 2025

@chia7712 @junrao Can you help review this change? Thanks a lot!

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.

4 participants