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: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
