omkreddy commented on a change in pull request #7956:
URL: https://github.com/apache/kafka/pull/7956#discussion_r432865277



##########
File path: 
clients/src/main/java/org/apache/kafka/server/authorizer/Authorizer.java
##########
@@ -114,6 +114,21 @@
      * This is an asynchronous API that enables the caller to avoid blocking 
during the update. Implementations of this
      * API can return completed futures using {@link 
java.util.concurrent.CompletableFuture#completedFuture(Object)}
      * to process the update synchronously on the request thread.
+     * <p>
+     * <b>Concurrent updates:</b>
+     * <ul>
+     *     <li>If ACLs are created using {@link 
#createAcls(AuthorizableRequestContext, List)} while a delete is in
+     *     progress, these ACLs may or may not be considered for deletion 
depending on the order of updates.
+     *     The returned {@link AclDeleteResult} indicates which ACLs were 
deleted.</li>
+     *     <li>If the provided filters use resource pattern type
+     *     {@link org.apache.kafka.common.resource.PatternType#MATCH} that 
needs to filter all resources to determine
+     *     matching ACLs, only ACLs that have already been propagated to the 
broker processing the ACL update will be
+     *     deleted. This may not include some ACLs that were persisted, but 
not yet propagated to all brokers. The
+     *     returned {@link AclDeleteResult} indicates which ACLs were 
deleted.</li>
+     *     <li>If the provided filters use other resource pattern types that 
perform a direct match, all matching ACLs
+     *     from previously completed {@link 
#createAcls(AuthorizableRequestContext, List)} )} are guaranteed
+     *     to be deleted.</li>

Review comment:
       I agree,  maybe  we can move this  doc to `AclAuthorizer`.  we can also 
mention here to refer implementation docs for concurrent update guarantees.




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to