rhauch opened a new pull request #11946:
URL: https://github.com/apache/kafka/pull/11946


   The `retryEndOffsets(…)` method in `TopicAdmin` recently added (KAFKA-12879, 
#11797) to allow the `KafkaBasedLog.start()` method to retry any failures 
reading the last offsets for a topic. However, this introduce a regression when 
talking to older brokers (0.10.x or earlier).
   
   The `KafkaBasedLog` already had logic that expected an 
`UnsupportedVersionException` thrown by the admin client when a Kafka API is 
not available on an older broker, but the new retry logic in `TopicAdmin` did 
not account for this and wrapped the exception, thereby breaking the 
`KafkaBasedLog` logic and preventing startup.
   
   The fix is to propagate this `UnsupportedVersionException` from the 
`TopicAdmin.retryEndOffsets(…)` method. Added a new unit test that first 
replicated the problem before the fix, and verified the fix corrects the 
problem.
   
   ### 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