kfaraz commented on code in PR #20245:
URL: https://github.com/apache/druid/pull/20245#discussion_r3927820823


##########
server/src/main/java/org/apache/druid/server/coordinator/loading/StrategicSegmentAssigner.java:
##########
@@ -1003,6 +1021,25 @@ private int loadReplicas(
     return numLoadsQueued;
   }
 
+  /**
+   * Tries to increase the load priority of the given unavailable segment (by
+   * changing the action from {@link SegmentAction#REPLICATE} to {@link 
SegmentAction#LOAD})
+   * if it is already present in the queue of the server.
+   *
+   * @return true only if the priority was increased successfully.
+   */
+  private boolean prioritizeLoadOfUnavailableSegment(
+      DataSegment segment,
+      ServerHolder server,
+      @Nullable PartialLoadProfile profile
+  )
+  {
+    return server.getActionOnSegment(segment) == SegmentAction.REPLICATE
+           && Objects.equals(profile, server.getProjectedProfile(segment))
+           && server.cancelOperation(SegmentAction.REPLICATE, segment)
+           && loadQueueManager.loadSegment(segment, server, 
SegmentAction.LOAD, profile);

Review Comment:
   Can be ignored for now since it is basically a dead branch which is 
effective only when `maxSegmentsInLoadQueue != 0`.



-- 
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]

Reply via email to