showuon commented on pull request #11681: URL: https://github.com/apache/kafka/pull/11681#issuecomment-1055416727
@hachikuji , I finally got time to investigate it. Short answer to your question: Yes, you're right! > From what I can tell, there might still be a race between the time that this offset gets updated in BrokerMetadataListener and the time that the latest entries have been published to BrokerMetadataPublisher. Is that delay enough to explain the issue? Yes, when broker unfenced, it means it has caught up to the current end of the log. So basically, the broker is ready. But the `BrokerMetadataPublisher` is in another thread, which will have race condition with the main thread (in test). That is, even when `waitForReadyBrokers` passed, all the broker images might still be out-of-date. Fix it now by waiting the metadata cache up-to-date in `waitForReadyBrokers`. Thank you. -- 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