Skip to content

KAFKA-20628 Add TTL-based expiration to PartitionLeaderCache#22390

Open
hgeraldino wants to merge 1 commit into
apache:trunkfrom
hgeraldino:fix/partition-leader-cache-ttl-v2
Open

KAFKA-20628 Add TTL-based expiration to PartitionLeaderCache#22390
hgeraldino wants to merge 1 commit into
apache:trunkfrom
hgeraldino:fix/partition-leader-cache-ttl-v2

Conversation

@hgeraldino
Copy link
Copy Markdown
Contributor

Cached partition leader mappings previously lived forever, which could cause AdminClient operations to target stale brokers after leadership changes.

This PR adds a TTL (driven by metadata.max.age.ms) so that expired entries are transparently filtered out of get() results, forcing a fresh metadata lookup for those

Cached partition leader mappings previously lived forever, which could
cause AdminClient operations to target stale brokers after leadership
changes. This adds a TTL (driven by metadata.max.age.ms) so that
expired entries are transparently filtered out of get() results,
forcing a fresh metadata lookup via the existing AdminApiDriver
mechanism.
@github-actions github-actions Bot added triage PRs from the community clients labels May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clients triage PRs from the community

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant