cmccabe commented on code in PR #12715:
URL: https://github.com/apache/kafka/pull/12715#discussion_r991498289


##########
metadata/src/main/java/org/apache/kafka/image/AclsImage.java:
##########
@@ -53,13 +49,15 @@ public Map<Uuid, StandardAcl> acls() {
         return acls;
     }
 
-    public void write(Consumer<List<ApiMessageAndVersion>> out) {
-        List<ApiMessageAndVersion> batch = new ArrayList<>();
+    public void write(ImageWriter writer, ImageWriterOptions options) {
+        // Technically, AccessControlEntryRecord appeared in 3.2-IV0, so we 
should not write it if
+        // the output version is less than that. However, there is a problem: 
pre-production KRaft
+        // images didn't support FeatureLevelRecord, so we can't distinguish 
3.2-IV0 from 3.0-IV1.
+        // The least bad way to resolve this is just to pretend that ACLs were 
in 3.0-IV1.

Review Comment:
   > I don't fully understand this comment. Are you saying that Kafka doesn't 
support clusters that have some servers at software version 3.0.x and some 
servers, specially the active controller, at software version 3.2.x?
   
   no, that is not what this means
   
   > So if the software version of this server is 3.2.x then we need to assume 
that the software version of every server is 3.2.x?
   
   no
   
   The comment just indicates that we should disallow ACLs in version 3.0, but 
we won't, because some people might be using them in version 3.2, and we can't 
distinguish those two versions due to the lack of `metadata.version`.



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