You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2019/11/05 20:18:15 UTC

[GitHub] [incubator-druid] LoriLori commented on issue #8808: use copy-on-write list in InMemoryAppender

LoriLori commented on issue #8808: use copy-on-write list in InMemoryAppender
URL: https://github.com/apache/incubator-druid/pull/8808#issuecomment-550001537
 
 
   I am learning from better developers and was thinking about contract of logger and how would it could be solved should it be inmemorylogger be used somewhere else some day.
   Isn't copy on write an overhead and a bit teaching inappropriate use of copy on write?
   Isn't logEvents.toArray() atomic  appropriate? 
   return Collections.unmodifiableList(Arrays.asList((LogEvent[]) logEvents.toArray()));
   Code readability is lower and would require a comment maybe.
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org