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

   There are a few cases in `ControllerApis` where we may see an `ApiException` 
wrapped as a `CompletionException`. This can happen in 
`QuorumController.allocateProducerIds` where the returned future is the result 
of calling `thenApply` on the future passed to the controller. The danger when 
this happens is that the `CompletionException` gets passed to 
`Errors.forException`, which translates it to an `UNKNOWN_SERVER_ERROR`. At a 
minimum, I found that the `AllocateProducerIds` and `UpdateFeatures` APIs were 
affected by this bug, but it is difficult to root out all cases. 
   
   Interestingly, `DeleteTopics` was not affected as I originally suspected. 
This is because we have logic in `ApiError.fromThrowable` to check for both 
`CompletionException` and `ExecutionException` and to pull out the underlying 
cause. This patch moves this logic out of `ApiError.fromThrowable` and into 
`Errors.forException` to be sure that we handle all cases where exceptions are 
converted to error codes.
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


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