kfaraz commented on code in PR #13197:
URL: https://github.com/apache/druid/pull/13197#discussion_r1010210402
##########
server/src/main/java/org/apache/druid/server/coordinator/HttpLoadQueuePeon.java:
##########
@@ -380,10 +407,12 @@ public void loadSegment(DataSegment segment,
LoadPeonCallback callback)
}
SegmentHolder holder = segmentsToLoad.get(segment);
-
if (holder == null) {
log.trace("Server[%s] to load segment[%s] queued.", serverId,
segment.getId());
- segmentsToLoad.put(segment, new LoadSegmentHolder(segment, callback));
+ queuedSize.addAndGet(segment.getSize());
+ holder = new SegmentHolder(segment, action, callback);
+ segmentsToLoad.put(segment, holder);
Review Comment:
We might still need the `segmentsToLoad` and `segmentsToDrop` atleast for
now because the balancer strategies use these to compute cost. This can be done
with `queuedSegments` itself but we might have to filter out the relevant
entries on every cost computation.
I do have a follow up PR which deals with the fixes in the strategy. I will
try to clean up this part there.
--
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]