Anubhav-Roy commented on code in PR #20299:
URL: https://github.com/apache/druid/pull/20299#discussion_r4027006535
##########
indexing-service/src/main/java/org/apache/druid/indexing/overlord/hrtr/HttpRemoteTaskRunner.java:
##########
@@ -1123,6 +1144,17 @@ private void pendingTasksExecutionLoop()
break;
}
+ if (eligibleWorkers == null) {
+ eligibleWorkers =
ImmutableMap.copyOf(getWorkersEligibleToRunTasks());
+ }
+
+ // Cheap pre-filter against the reused snapshot: skip tasks that
clearly have no worker.
+ if (findWorkerToRunTask(ti.getTask(), eligibleWorkers) == null) {
+ continue;
+ }
+
+ // A candidate exists in the snapshot; re-select against a fresh
snapshot before
+ // reserving so the assignment reflects current worker capacity
(see comment above).
immutableWorker = findWorkerToRunTask(ti.getTask());
Review Comment:
This selection→reservation sequence is unchanged from master, so it's not a
regression here.
--
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]