jolshan opened a new pull request, #14713:
URL: https://github.com/apache/kafka/pull/14713
TestUtils.createTopicWithAdmin calls waitForAllPartitionsMetadata which
waits for partition(s) to be present in each brokers' metadata cache. This is a
sufficient check in ZK mode because the controller sends an LISR request before
sending an UpdateMetadataRequest which means that the partition in the
ReplicaManager will be updated before the metadata cache.
In KRaft mode, the metadata cache is updated first, so the check may return
before partitions and other metadata listeners are fully initialized.
Testing:
Insert a Thread.sleep(100) in BrokerMetadataPublisher.onMetadataUpdate after
// Publish the new metadata image to the metadata cache.
metadataCache.setImage(newImage)
and run EdgeCaseRequestTest.testProduceRequestWithNullClientId and the test
will fail locally nearly deterministically. After the change(s), the test no
longer fails.
Reviewers: Justine Olshan <[email protected]>
Conflicts:
core/src/test/scala/unit/kafka/server/GroupCoordinatorBaseRequestTest.scala
core/src/test/scala/integration/kafka/admin/TopicCommandIntegrationTest.scala
I removed the file that didn't exist and added the controllerServer
arguments to TopicCommandIntegrationTest. Will rerun.
--
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]