chia7712 commented on code in PR #15507:
URL: https://github.com/apache/kafka/pull/15507#discussion_r1524056640


##########
server-common/src/main/java/org/apache/kafka/server/mutable/BoundedList.java:
##########
@@ -35,24 +35,12 @@ public class BoundedList<E> implements List<E> {
     private final int maxLength;
     private final List<E> underlying;
 
-    public static <E> BoundedList<E> newArrayBacked(int maxLength) {
-        return new BoundedList<>(maxLength, new ArrayList<>());
-    }
-
-    public static <E> BoundedList<E> newArrayBacked(int maxLength, int 
initialCapacity) {

Review Comment:
   > I'm not sure what you mean, could you please elaborate?
   
   sorry for unclear comment. 
   
   It seems to me "initialCapacity" is still useful if we "expect" the size of 
batch could be large. For example: create/delete a bunch of topics - that is a 
common usage. For such use cases, it would be better to set the initial 
capacity to avoid the resize problem you described.
   
   
   



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