Skip to content

KAFKA-20397 Avoid blocking on fetchBuffer when metadata error is pending#21991

Open
nileshkumar3 wants to merge 1 commit intoapache:trunkfrom
nileshkumar3:KAFKA-20397
Open

KAFKA-20397 Avoid blocking on fetchBuffer when metadata error is pending#21991
nileshkumar3 wants to merge 1 commit intoapache:trunkfrom
nileshkumar3:KAFKA-20397

Conversation

@nileshkumar3
Copy link
Copy Markdown
Contributor

When a metadata error (e.g. TopicAuthorizationException) is discovered by the background thread
and set on the inflight AsyncPollEvent between checkInflightPoll() and fetchBuffer.awaitWakeup()
in pollForFetches(), the consumer blocks for the full poll timeout before surfacing the error.
This adds a check in pollForFetches() to skip the blocking wait when the inflight poll event
already has a metadata error, allowing the error to be surfaced promptly on the next iteration
of the poll loop via checkInflightPoll().

Reviewers - @lianetm @AndrewJSchofield @kirktrue

@github-actions github-actions bot added triage PRs from the community consumer clients small Small PRs labels Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clients consumer small Small PRs triage PRs from the community

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant