gianm commented on issue #3956: Thread safe reads for aggregators in 
IncrementalIndex
URL: https://github.com/apache/incubator-druid/pull/3956#issuecomment-406384627
 
 
   I was just looking at this issue again after the conversations on the 
mailing list about sketch synchronization: 
https://lists.apache.org/thread.html/9899aa790a7eb561ab66f47b35c8f66ffe695432719251351339521a@%3Cdev.druid.apache.org%3E
   
   I was wondering, does it make more sense for thread-safety here to be 
handled systematically (at the IncrementalIndex) or for each aggregator to be 
thread safe? Currently we do different approaches: the sketch aggregators 
endeavor to be thread-safe on their own. The primitive aggregators don't bother 
to even try, and they're probably fine, since they're primitives. 
HyperLogLogAggregator tries a little bit -- it at least makes sure the 
different calls use different buffer objects -- but I bet it has a bug where 
"get" could potentially read something weird and corrupt in some rare 
situations. (Like if the offset is being updated while a "get" is going on.)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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]

Reply via email to