capistrant commented on code in PR #20267:
URL: https://github.com/apache/druid/pull/20267#discussion_r3959699477
##########
server/src/main/java/org/apache/druid/server/coordinator/loading/StrategicSegmentAssigner.java:
##########
@@ -516,25 +520,68 @@ private int loadPartialReplicas(
return 0;
}
- // The classifier's list is already the complete candidate set when
nothing was canceled.
+ // The classifier's lists are already the complete candidate sets when
nothing was canceled.
+ final List<ServerHolder> inPlaceDestinations;
final List<ServerHolder> freshCandidates;
if (canceledStaleServers.isEmpty()) {
+ inPlaceDestinations = status.getEligibleForInPlaceReload();
freshCandidates = status.getEligibleForFreshLoad();
} else {
+ inPlaceDestinations = new
ArrayList<>(status.getEligibleForInPlaceReload());
freshCandidates = new ArrayList<>(status.getEligibleForFreshLoad());
- freshCandidates.addAll(canceledStaleServers);
+ for (ServerHolder server : canceledStaleServers) {
+ if (server.isServingSegment(segment) &&
PartialSegmentStatusInTier.canReloadInPlace(server)) {
+ inPlaceDestinations.add(server);
+ } else {
+ freshCandidates.add(server);
+ }
+ }
}
- final Iterator<ServerHolder> destinations = Iterators.concat(
- serversToLoadSegment(segment, tier, freshCandidates),
- status.getEligibleForAdditiveReload().iterator()
+ int numLoadsQueued = queuePartialLoads(
Review Comment:
also, does the coded behavior actually help avoid a loop of requests to in
place reload that fail each time?
request in place, fail. unannounce stale load. fresh load on next cycle.
instead of
request in place. fail. request in place. fail. repeat.
--
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]