kuoche1712003 opened a new pull request, #22279:
URL: https://github.com/apache/kafka/pull/22279
Previously, `ConsumerNetworkThread.maybeFailOnMetadataError` would
propagate a
stored `metadataError` to the next incoming `MetadataErrorNotifiableEvent`
without
checking whether the error was still relevant to the current assignment.
After
`consumer.assign()` switched to a different topic, the new
`AsyncPollEvent` could
inherit a stale `TopicAuthorizationException` from the previous assignment
and fail
unexpectedly.
Fix: before propagating the error, compare its topic set against the
current
assignment via `SubscriptionState.assignedPartitions()`. If the error
topics are
disjoint from the current assignment, the error is silently dropped. The
underlying
`Metadata.unauthorizedTopics` is already cleared by
`maybeThrowAnyException`, so
the next metadata refresh will re-surface the error if the topic is still
relevant.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]