nishantmonu51 opened a new pull request #3956: Thread safe reads for aggregators in IncrementalIndex URL: https://github.com/apache/incubator-druid/pull/3956 Aggregators are *NOT* thread safe and if two threads concurrently try to read/write to the aggregator the reader may read absurd values since the aggregate method is not *atomic*. In case of IncrementalIndex the writes are protected by a sync block but the reads are unprotected, so its possible for the queries to read absurd values in aggregator.get(). This PR adds a test that can reproduce that behavior by wrapping Aggregators inside a ThreadSafetyAssertionAggregator. TODO: test any performance impacts.
---------------------------------------------------------------- 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]
