gianm commented on a change in pull request #7088: Improve parallelism of
zookeeper based segment change processing
URL: https://github.com/apache/incubator-druid/pull/7088#discussion_r279101661
##########
File path:
server/src/main/java/org/apache/druid/server/coordinator/CuratorLoadQueuePeon.java
##########
@@ -152,29 +176,18 @@ public int getNumberOfSegmentsInQueue()
@Override
public void loadSegment(final DataSegment segment, final LoadPeonCallback
callback)
{
- synchronized (lock) {
- if ((currentlyProcessing != null) &&
- currentlyProcessing.getSegmentId().equals(segment.getId())) {
- if (callback != null) {
- currentlyProcessing.addCallback(callback);
- }
- return;
- }
- }
+ SegmentHolder segmentHolder = new SegmentHolder(segment, LOAD,
Collections.singletonList(callback));
Review comment:
Having the null check earlier is probably a bit cleaner but it also seems
like a minor point.
----------------------------------------------------------------
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]