samarthjain commented on code in PR #17847:
URL: https://github.com/apache/druid/pull/17847#discussion_r2067067971


##########
server/src/main/java/org/apache/druid/segment/realtime/appenderator/StreamAppenderator.java:
##########
@@ -354,40 +376,43 @@ public AppenderatorAddResult add(
 
     boolean isPersistRequired = false;
     boolean persist = false;
-    List<String> persistReasons = new ArrayList<>();
+    final String[] persistReasons = new String[NUMBER_OF_PERSIST_REASONS];

Review Comment:
   +1 to moving to another PR. The change is unrelated to the new metrics 
implementation. 
   
   Also, another option would have been to just initialize the list with 
minCapacity with some buffer for reasons to be added in the future. So 
something like `new ArrayList<>(10)` . 



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to