hachikuji commented on code in PR #12145:
URL: https://github.com/apache/kafka/pull/12145#discussion_r869633002


##########
metadata/src/main/java/org/apache/kafka/controller/AclControlManager.java:
##########
@@ -152,7 +154,11 @@ ControllerResult<List<AclDeleteResult>> 
deleteAcls(List<AclBindingFilter> filter
                 results.add(new 
AclDeleteResult(ApiError.fromThrowable(e).exception()));
             }
         }
-        return ControllerResult.atomicOf(records, results);
+        return ControllerResult.atomicOf(dedupeApiMessageAndVersion(records), 
results);
+    }
+
+    private List<ApiMessageAndVersion> 
dedupeApiMessageAndVersion(List<ApiMessageAndVersion> messages) {
+        return new HashSet<>(messages).stream().collect(Collectors.toList());

Review Comment:
   nit: doesn't make a big difference, but any reason not to begin with a Set 
instead of converting from a List?



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