Skip to content

KAFKA-20746: NPE in MetadataCache#toCluster#22723

Open
brandboat wants to merge 1 commit into
apache:trunkfrom
brandboat:KAFKA-20746
Open

KAFKA-20746: NPE in MetadataCache#toCluster#22723
brandboat wants to merge 1 commit into
apache:trunkfrom
brandboat:KAFKA-20746

Conversation

@brandboat

@brandboat brandboat commented Jul 1, 2026

Copy link
Copy Markdown
Member

MetadataCache#toCluster builds a Cluster view for quota callbacks.
Previously, it filtered fenced brokers out of the broker-to-node map,
but partition metadata can still reference fenced brokers as replicas.
When such replicas were converted to PartitionInfo, the missing broker
entry could cause a NullPointerException.

Include all registered brokers in the broker-to-node map so fenced
replicas can be represented as offline replicas in the generated
Cluster.

@github-actions github-actions Bot added kraft small Small PRs labels Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant