lianetm commented on PR #17440:
URL: https://github.com/apache/kafka/pull/17440#issuecomment-2489954215

   > I’m thinking that some test fail for methods like `consumer.poll`, which 
involve processBackgroundEvent, if a `TopicAuthorizationException` occurs, 
these two error handling mechanisms might conflict, leading to behavior that 
deviates from expectations.
   
   Sorry I missed this comment before. Great point, the issue is that with this 
PR (no matter how we implement it) we end up failing api calls/events on 
metadata errors, but still also keeping the previous logic that generated an 
ErrorEvent for them. 
   
   
https://github.com/apache/kafka/blob/e73edce10bf0badf46d729045b57dc982666bd5a/clients/src/main/java/org/apache/kafka/clients/consumer/internals/NetworkClientDelegate.java#L155-L157
   
   We were propagating metadata errors via ErrorEvent thinking that it was only 
meant to be consumed from poll (which was a wrong assumption). If, with this 
PR, we introduce a mechanism to propagate it via the api events, I wonder if we 
should consider removing the redundant ErrorEvent for this case? (without 
ErrorEvent, poll would still fail as expected, because the 
CheckAndUpdatePositions would fail with the auth error)


-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to