cmccabe commented on a change in pull request #11629:
URL: https://github.com/apache/kafka/pull/11629#discussion_r779746531



##########
File path: 
core/src/test/scala/unit/kafka/server/AbstractCreateTopicsRequestTest.scala
##########
@@ -136,11 +144,13 @@ abstract class AbstractCreateTopicsRequestTest extends 
BaseRequestTest {
         }
       }
 
-      // Verify controller broker has the correct metadata
-      verifyMetadata(controllerSocketServer)
+      if (!isKRaftTest()) {

Review comment:
       In ZK mode, the ZK change is done by the specific broker that receives 
the CreateTopicsRequest.  Therefore, we know that that broker's metadata cache 
will get updated immediately. This isn't the case in KRaft mode. In KRaft mode 
the change is made by the controller, not the broker, so the broker's metadata 
cache will not be immediately updated. Therefore, we have to wait for metadata 
propagation, which we do on the next few lines. So, we are verifying that 
metadata, just after waiting for the propagation delay.
   
   This is something that actually will change even in ZK mode, once we have 
KIP-590 enabled. We probably will just have to get rid of this check even in ZK 
mode once we enable that.




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