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


##########
server/src/main/java/org/apache/druid/server/coordinator/ServerHolder.java:
##########
@@ -167,7 +167,7 @@ private void initializeQueuedSegments(
       }
 
       final SegmentAction action = holder.getAction();
-      addToQueuedSegments(holder.getSegment(), simplify(action));
+      addToQueuedSegments(holder.getSegment(), action);

Review Comment:
   Verified on the current head: `ServerHolder` now keeps `REPLICATE` distinct, 
and `getLoadingSegments()` includes both `LOAD` and `REPLICATE`. The queued 
replica is therefore visible to the loading-segment path used by the balancer. 
I reviewed 12 of 12 changed files and found no remaining issues.
   
   <!-- mergelens:review -->



##########
server/src/main/java/org/apache/druid/server/coordinator/loading/StrategicSegmentAssigner.java:
##########
@@ -672,6 +679,13 @@ private int updateReplicasInTier(
       cancelOperations(SegmentAction.MOVE_FROM, movingReplicas, segment, 
segmentStatus);
     }
 
+    // If segment is unavailable, prioritize load by changing REPLICATE 
actions to LOAD
+    if (shouldPrioritizeLoadOfUnavailableSegment) {
+      for (ServerHolder server : 
segmentStatus.getServersPerforming(SegmentAction.REPLICATE)) {

Review Comment:
   Verified on the current head: surplus `REPLICATE`/`LOAD` cancellation now 
runs before the unavailable-segment reprioritization loop. Canceled replicas 
are skipped by the action check, while remaining `REPLICATE` operations can be 
promoted. I reviewed 12 of 12 changed files and found no remaining issues.
   
   <!-- mergelens:review -->



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