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

   The exceptionally handlers in CoordinatorTimerImpl and 
CoordinatorExecutorImpl use instanceof checks to determine how to handle 
failures. However, exceptions propagated through CompletableFuture chains may 
be wrapped in CompletionException or ExecutionException, causing the instanceof 
checks to fail and the exceptions to be misclassified. This could lead to 
incorrect behavior such as retrying when the coordinator is no longer active or 
logging at the wrong level.
   
   This patch unwraps exceptions using Errors.maybeUnwrapException at the top 
of each exceptionally handler before performing the instanceof checks. It also 
adds parameterized test coverage in CoordinatorTimerImplTest to verify correct 
behavior with both wrapped and unwrapped exceptions.
   


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

Reply via email to