apoorvmittal10 commented on PR #17796:
URL: https://github.com/apache/kafka/pull/17796#issuecomment-2484067533

   > @apoorvmittal10 : Thanks for the PR. Left a comment.
   > 
   > Regarding whether to use a listener at the Partition level or from 
BrokerMetadataPublisher, it's probably better to use a Partition level 
listener. It's true that the source of truth of the metadata is 
BrokerMetadataPublisher. However, the share partition requests only interact 
with metadata at the Partition level. So, it's more natural to take an action 
to share partitions after the metadata has been reflected at the Partition 
level. Otherwise, what could happen is that we remove a partition after the 
metadata changes in BrokerMetadataPublisher, but not in Partition yet. When we 
try to create the new SharePartition, it's still created with the outdated 
leaderEpoch.
   
   Thanks a lot for confirming. Then I will go ahead with this approach and ll 
add tests to the PR.
   cc: @mumrah @dajac 


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