KAFKA-20295: Use current quorum voters for feature validation - #23038
Open
lh0156 wants to merge 1 commit into
Open
KAFKA-20295: Use current quorum voters for feature validation#23038lh0156 wants to merge 1 commit into
lh0156 wants to merge 1 commit into
Conversation
Use the Raft client's current voter set when validating controller feature support so stale registrations from removed dynamic-quorum voters do not block metadata.version upgrades. Keep static quorum validation as the fallback for existing describers and cover both removed registrations and missing active registrations. Generated-by: OpenAI Codex (GPT-5)
Contributor
|
Should this target 4.0-4.3 branches instead of trunk? About the PR, should it prevent an outdated controller from rejoining the quorum if it was bypassed by feature upgrade script? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
KAFKA-20295: Use current quorum voters for controller feature validation
The controller feature validation path currently iterates every controller registration in the metadata image. With a dynamic quorum, a controller can be removed from the Raft voter set while its historical registration remains in the image. If that registration advertises an older metadata.version range, it can incorrectly prevent a valid metadata.version upgrade.
This change exposes the current voter IDs from Raft and passes them through the cluster feature support describer. Feature validation now checks registered controller capabilities only for current quorum voters and requires each current voter to have a registration. Existing describers that do not provide dynamic voter IDs retain the static QuorumFeatures fallback.
Testing:
./gradlew :metadata:test --tests org.apache.kafka.controller.FeatureControlManagerTest --no-build-cache./gradlew :raft:test --tests org.apache.kafka.raft.KafkaRaftClientReconfigTest --no-build-cache./gradlew :metadata:test --no-build-cache./gradlew :metadata:spotlessCheck :raft:spotlessCheck --no-build-cache./gradlew :raft:kafkaPublicApiChecker :metadata:kafkaPublicApiChecker --no-build-cachegit diff --checkThe regression tests cover both stale registrations from removed voters and missing registrations for current voters. Jira: https://issues.apache.org/jira/browse/KAFKA-20295
Reviewers: Davide Armand davide.armand@aiven.io