[ https://issues.apache.org/jira/browse/KAFKA-2587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14943705#comment-14943705 ]
Jun Rao commented on KAFKA-2587: -------------------------------- [~parth.brahmbhatt], the issue for the above test failure can be due to the following. Even though we update the acl cache directly when we add or remove acls, the acl cache will be updated again by the ZK listener thread. So, what can happen is that: (1) we make an acl change and update the acl cache and a ZK event is fired and it reads the acl change and is about to apply the update to the acl cache, (2) we make a second acl change and update the acl cache directly, (3) the logic in the ZK event in (1) continues and will temporarily update the acl cache with just the first acl change. So if you test the acl at this moment and expect both acl changes to be in the cache, the assertion will fail. That seems to be what's happening in SimpleAclAuthorizerTest.scala:214 since we made multiple acl changes before the assertion. If we wrap the assertion in line 214 in waitUntil(), the assertion should eventually succeed. Also, currently, addAcl() and removeAcl() In SimpleAclAuthorizer directly update the acl cache as well as triggering a ZK event. I am wondering if it's simpler to not update the acl cache directly and only let the ZK event to do the update. There is no guarantee that we will see the latest acl even if we update the cache directly (see the above case). Then, we just need to wrap all acl assertions in SimpleAclAuthorizerTest with waitUntil. Finally, it seems that the issue with "Simultaneously Consistent Cross-Client Views" only happens when you have multiple ZK servers in the ensemble. In unit tests, we only have a single ZK server. > Transient test failure: `SimpleAclAuthorizerTest` > ------------------------------------------------- > > Key: KAFKA-2587 > URL: https://issues.apache.org/jira/browse/KAFKA-2587 > Project: Kafka > Issue Type: Sub-task > Reporter: Ismael Juma > Assignee: Parth Brahmbhatt > Fix For: 0.9.0.0 > > > I've seen `SimpleAclAuthorizerTest ` fail a couple of times since its recent > introduction. Here's one such build: > https://builds.apache.org/job/kafka-trunk-git-pr/576/console > [~parth.brahmbhatt], can you please take a look and see if it's an easy fix? -- This message was sent by Atlassian JIRA (v6.3.4#6332)