alanlau28 commented on PR #23821:
URL: https://github.com/apache/kafka/pull/23821#issuecomment-6370877803

   Thanks for the review @AndrewJSchofield. I've also removed 
`latestVersionUnstable` from the RPCs given they are inter-broker. 
   
   > Let's put the calculation of cacheHelper.isRequestHeaderV3Supported() 
outside the loop and the synchronised block.
   
   Doing this exposed a startup case. The persister's send thread starts before 
the broker loads its first metadata image, and `generateRequests()` runs on 
every pass, including the first pass, when there's nothing to send. Before that 
first image, `metadataCache.metadataVersion()` throws `IllegalStateException` 
rather than returning `null`. The send thread treated that as fatal, and a 
broker exited during startup. So `isRequestHeaderV3Supported()` now returns 
`false` in that case. The next pass reads the real version.


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