leventov commented on a change in pull request #7938: locking in Theta sketch
buffer aggregator
URL: https://github.com/apache/incubator-druid/pull/7938#discussion_r317998596
##########
File path:
extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/tuple/ArrayOfDoublesSketchMergeBufferAggregator.java
##########
@@ -89,7 +88,7 @@ public void aggregate(final ByteBuffer buf, final int
position)
// might might be considered, but it would increase complexity including
relocate() support.
final WritableMemory mem = WritableMemory.wrap(buf,
ByteOrder.LITTLE_ENDIAN);
final WritableMemory region = mem.writableRegion(position,
maxIntermediateSize);
- final Lock lock =
stripedLock.getAt(ArrayOfDoublesSketchBuildBufferAggregator.lockIndex(position)).writeLock();
+ final Lock lock =
stripedLock.getAt(StripedLockHelper.lockIndex(position)).writeLock();
lock.lock();
try {
final ArrayOfDoublesUnion union =
ArrayOfDoublesSketches.wrapUnion(region);
Review comment:
Same as in `ArrayOfDoublesSketchBuildBufferAggregator.aggregate()`
----------------------------------------------------------------
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]