jolshan opened a new pull request #10282:
URL: https://github.com/apache/kafka/pull/10282


   KIP-516 introduced partition.metadata file to persist the topic ID on the 
broker. It is created through handling the LeaderAndIsrRequest in 
ReplicaManager. (See https://github.com/apache/kafka/pull/10143 for the code 
path.) RaftReplicaManager was missing the analogue code path for Kip-500 code. 
Like in ReplicaManager, RaftReplicaManager will now check or create the 
partition.metadata file when handling metadata records.
   
   Tests added to ensure the file is created and that the correct error is 
thrown when the id is inconsistent.
   
   Also adds a few methods to get topic ID from MetadataImageBuilder as this is 
the most convenient way to get topic ID from RaftReplicaManager.
   I thought it made sense to add to the path that defers and the path that 
does not defer. Let me know if this assumption was not correct.
   
   ### 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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to