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/08/27 19:43:20 UTC

[GitHub] [incubator-druid] nishantmonu51 opened a new pull request #3956: Thread safe reads for aggregators in IncrementalIndex

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