jolshan opened a new pull request, #15755:
URL: https://github.com/apache/kafka/pull/15755

   KIP-890 Part 1 introduced verification of transactions with the transaction 
coordinator on the `Produce` and `TxnOffsetCommit` paths. This introduced the 
possibility of new errors when responding to those requests. For backwards 
compatibility with older clients, a choice was made to convert some of the new 
retriable errors to existing errors that are expected and retried correctly by 
older clients.
   
   `NETWORK_EXCEPTION` was forgotten about and not converted, but can occur if, 
for example, the transaction coordinator is temporarily refusing connections. 
Now, we convert it to:
    * `NOT_ENOUGH_REPLICAS` on the `Produce` path, just like the other 
retriable errors that can arise from transaction verification.
    * `COORDINATOR_LOAD_IN_PROGRESS` on the `TxnOffsetCommit` path. This error 
does not force coordinator lookup on clients, unlike 
`COORDINATOR_NOT_AVAILABLE`. Note that this deviates from KIP-890, which says 
that retriable errors should be converted to `COORDINATOR_NOT_AVAILABLE`.
   
    Conflicts:
        core/src/main/scala/kafka/server/ReplicaManager.scala
        
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupCoordinatorService.java
        
group-coordinator/src/test/java/org/apache/kafka/coordinator/group/GroupCoordinatorServiceTest.java
   
   There were some conflicts in the how the code path changed. We have three 
paths. 
   1. Produce -- In appendEntries we have the callback just for produce 
requests. I've included the error and the comment there.  
   2. Old Group Coordinator -- In GroupMetadataManager, we handle the 
conversion in `maybeConvertOffsetCommitError` This path is separate from the 
produce path. 
   3. New Group Coordinator -- Not supported in 3.7


-- 
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