chia7712 commented on code in PR #15830:
URL: https://github.com/apache/kafka/pull/15830#discussion_r1586037686


##########
core/src/main/scala/kafka/admin/AclCommand.scala:
##########
@@ -115,8 +115,6 @@ object AclCommand extends Logging {
           val aclBindings = acls.map(acl => new AclBinding(resource, 
acl)).asJavaCollection
           adminClient.createAcls(aclBindings).all().get()
         }
-
-        listAcls(adminClient)

Review Comment:
   > As I understand, listAcls() can be served by any broker in kraft mode, not 
just by controller. So potentially some brokers may not have most up-to-date 
copy of metadata right after createAcls() call. Here there is no interval 
between createAcls() and listAcls(), so probability of such race condition is 
higher.
   From [KIP-500](https://cwiki.apache.org/confluence/display/KAFKA/KIP-500) 
and the 
[diagram](https://cwiki.apache.org/confluence/download/attachments/123898922/b.png)
 it seems what brokers have to periodically pull new metadata from the kraft 
controller, so metadata is not available on all brokers immediately.
   Please correct me if I'm wrong here.
   
   agree to race condition. 
   
   > Probably, it can be related to the test infrastructure setup. I'll try to 
re-write the test to java and use new test infrastructure, let's see it solves 
the issue
   
   agree that we should fix the test infra instead of changing the output of 
command tool. I worried about that some users may rely on the output of 
`listAcls`, so we should not change the output arbitrarily. 



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