showuon commented on pull request #11681:
URL: https://github.com/apache/kafka/pull/11681#issuecomment-1066451508


   > What do you think about modifying the heartbeating logic so that we do not 
advertise an offset to the controller until it has been published?
   
   @hachikuji , thanks for your suggestion. But sorry, I'm not very familiar 
with kraft. As far as I can see, we'll wait until the broker has caught up with 
the latest metadata from the controller quorum (i.e. `initialCatchUpFuture`) 
before we unfenced the broker. Then we send out the unfenced heartbeat to 
controller, controller check `wantFence` and high offset to see if this broker 
can be unfenced. Next, it'll commit the unfenced metadata, and wait for the 
broker to read the update, and let the listener to publish the update to the 
metadata cache. That's what my understand (correct me if I'm wrong). 
   
   So, if we don't advertise the offset to controller, the controller won't 
unfence the broker becaue metadata is not caught up, and no metadata commit 
happen, and the broker listener won't publish the unfenced info. I don't know 
how we can achieve it. Could you help explain to me?
   
   Thank you.
   
   Another thing is that do you think we could take this temporary solution 
(i.e. waiting the metadata cache up-to-date in `waitForReadyBrokers`) to fix 
the tests first, and we can work on the better solution you suggested in 
another PR if it takes time. WDYT?


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