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


##########
metadata/src/main/java/org/apache/kafka/metadata/BrokerRegistration.java:
##########
@@ -192,7 +192,7 @@ private BrokerRegistration(
         this.isMigratingZkBroker = isMigratingZkBroker;
         directories = new ArrayList<>(directories);
         directories.sort(Uuid::compareTo);
-        this.directories = Collections.unmodifiableList(directories);
+        this.sortedDirectories = Collections.unmodifiableList(directories);

Review Comment:
   Seems like we should copy the list and sort it here to make sure that it 
actually is sorted. It should be a short list (a dozen or so max) so not a big 
performance issue.



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