dengziming commented on pull request #11951: URL: https://github.com/apache/kafka/pull/11951#issuecomment-1080546553
Changing the heartbeat request to advertise an offset only after it has been published, would make the test less flaky but can't completely remove the flakiness, because the QuorumController will mark a broker as unfenced as soon as the broker catches up to the LEO the first time, at this point, the UnfenceBrokerRecord has not yet been generated. This can't be perfectly solved since we will encounter the "chicken and egg" problem here: QuorumController waits for the broker to publish `UnfenceBrokerRecord` to unfenced it, the broker waits for the QuorumController to unfenced it and generate `UnfenceBrokerRecord`. So we'd better try both solutions here, postpone advertising an offset until it is published and wait for MetadataCache has acknowledged all brokers. cc @showuon @hachikuji -- 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]
