mirror of https://github.com/apache/druid.git
Workaround for non-thread-safe use of CardinalityAggregator. (#4304)
This commit is contained in:
parent
e043bf88ec
commit
22e5f52d00
|
@ -109,7 +109,9 @@ public class CardinalityAggregator implements Aggregator
|
|||
@Override
|
||||
public Object get()
|
||||
{
|
||||
return collector;
|
||||
// Workaround for non-thread-safe use of HyperLogLogCollector.
|
||||
// OnheapIncrementalIndex has a penchant for calling "aggregate" and "get" simultaneously.
|
||||
return HyperLogLogCollector.makeCollectorSharingStorage(collector);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -55,7 +55,8 @@ public class HyperUniquesAggregator implements Aggregator
|
|||
@Override
|
||||
public Object get()
|
||||
{
|
||||
// Workaround for OnheapIncrementalIndex's penchant for calling "aggregate" and "get" simultaneously.
|
||||
// Workaround for non-thread-safe use of HyperLogLogCollector.
|
||||
// OnheapIncrementalIndex has a penchant for calling "aggregate" and "get" simultaneously.
|
||||
return HyperLogLogCollector.makeCollectorSharingStorage(collector);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue