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/06 06:46:46 UTC

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

leventov commented on issue #8808: use copy-on-write list in InMemoryAppender
URL: https://github.com/apache/incubator-druid/pull/8808#issuecomment-550170383
 
 
   @LoriLori `logEvents.toArray()` doesn't solve the race condition - it may still race with an addition to `logEvents` and throw some exception, unless you make both `append()` and `getLogEvents()` synchronized.
   
   Since this class resides in tests, not production, the performance doesn't matter and we shouldn't waste time comparing `synchronized` and `CopyOnWriteArrayList`. While `CopyOnWriteArrayList` solution is a bit simpler.

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