kfaraz commented on code in PR #13197:
URL: https://github.com/apache/druid/pull/13197#discussion_r995348391
##########
server/src/main/java/org/apache/druid/server/coordinator/CuratorLoadQueuePeon.java:
##########
@@ -181,10 +183,10 @@ public int getNumberOfSegmentsInQueue()
}
@Override
- public void loadSegment(final DataSegment segment, @Nullable final
LoadPeonCallback callback)
+ public void loadSegment(final DataSegment segment, SegmentAction action,
@Nullable final LoadPeonCallback callback)
{
- SegmentHolder segmentHolder = new SegmentHolder(segment, Action.LOAD,
Collections.singletonList(callback));
- final SegmentHolder existingHolder = segmentsToLoad.putIfAbsent(segment,
segmentHolder);
+ QueuedSegment segmentHolder = new QueuedSegment(segment, action, callback);
Review Comment:
> That said, I would've expected the queue itself to return a QueuedSegment
rather than something creating one of those before it's actually queued...
Do you mean like a `computeIfAbsent` rather than `putIfAbsent`?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]