rreddy-22 opened a new pull request, #14657:
URL: https://github.com/apache/kafka/pull/14657

   **Problem Statement:**
   When a new leader is elected for a __consumer_offset partition, the 
followers are notified to unload the state. However, only the former leader is 
aware of it. The remaining follower prints out the following error:
   `ERROR [GroupCoordinator id=1] Execution of 
UnloadCoordinator(tp=__consumer_offsets-1, epoch=0) failed due to This is not 
the correct coordinator.. 
(org.apache.kafka.coordinator.group.runtime.CoordinatorRuntime)`
   The error is actually correct and expected when in the remaining follower 
case, however this could be misleading.
   
   **Solution:**
   1.  When scheduleInternalOperation is called, inside the lambda function 
that is executed at the event runtime, the existence of the context is checked. 
   2. If the context doesn't exist, previously the exception would be thrown, 
now we just skip any operations and log an info message.
   
   Test was added to check the same, all other tests are still passing as 
expected.
   


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