Lianet Magrans created KAFKA-18034:
--------------------------------------

             Summary: CommitRequestManager should fail pending requests on 
fatal coordinator errors
                 Key: KAFKA-18034
                 URL: https://issues.apache.org/jira/browse/KAFKA-18034
             Project: Kafka
          Issue Type: Bug
          Components: clients, consumer
            Reporter: Lianet Magrans


The commit request manager requires a known coordinator to send requests fetch 
and commit offsets (sync and async).

If there is no known coordinator, the commit manager simply returns no requests 
on poll, but it keeps pending requests in hand, to be send as soon as there is 
a known coordinator. This ensures that on recoverable errors the requests are 
sent. But if there is a fatal error looking up a coordinator (ie. 
GroupAuthorizationFailed), the commit manager does not fail the pending 
requests it has in hand. This means that api calls that generate commit/fetch 
requests will not be aware of the error.

We should consider if there is a fatal error with the coordinator when there is 
a commitManager poll that finds not coordinator

[https://github.com/apache/kafka/blob/50c15b94c94fbe8f964703c057963b38100b0bd6/clients/src/main/java/org/apache/kafka/clients/consumer/internals/CommitRequestManager.java#L181]

In that case, we should fail all pendingRequests to ensure that the calling API 
funcs know about the error. This should allow us to enable auth tests that are 
currently failing for the new consumer due to this gap (expecting 
GroupAuthException on consumer api calls). Ex.  
https://github.com/apache/kafka/blob/50c15b94c94fbe8f964703c057963b38100b0bd6/core/src/test/scala/integration/kafka/api/AuthorizerIntegrationTest.scala#L1277

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to